diff options
author | germeier <germeier> | 2003-07-15 07:34:52 +0000 |
---|---|---|
committer | germeier <germeier> | 2003-07-15 07:34:52 +0000 |
commit | 170e9880d8b7321eab663ce56e7874ed7f835f56 (patch) | |
tree | 245649ade8c5d8dd879b9698abe55a830479d3d8 /libmpio/src | |
parent | eb0f0a90a2b2f763bf4682f0565a082439485b85 (diff) | |
download | mpiosh-170e9880d8b7321eab663ce56e7874ed7f835f56.tar.gz mpiosh-170e9880d8b7321eab663ce56e7874ed7f835f56.tar.bz2 mpiosh-170e9880d8b7321eab663ce56e7874ed7f835f56.zip |
follow up fix for the broken internal FAT fix
added FTYPE_BROKEN
Diffstat (limited to 'libmpio/src')
-rw-r--r-- | libmpio/src/directory.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmpio/src/directory.c b/libmpio/src/directory.c index bb19518..7240c14 100644 --- a/libmpio/src/directory.c +++ b/libmpio/src/directory.c @@ -1,5 +1,5 @@ /* - * $Id: directory.c,v 1.9 2003/07/14 21:29:09 germeier Exp $ + * $Id: directory.c,v 1.10 2003/07/15 07:34:53 germeier Exp $ * * libmpio - a library for accessing Digit@lways MPIO players * Copyright (C) 2002, 2003 Markus Germeier @@ -804,7 +804,13 @@ mpio_dentry_get_real(mpio_t *m, mpio_mem_t mem, BYTE *buffer, *type = FTYPE_PLAIN; if (mem == MPIO_INTERNAL_MEM) { f = mpio_dentry_get_startcluster(m, mem, buffer); - *type = m->internal.fat[f->entry * 0x10 + 0x06]; + if (f) { + *type = m->internal.fat[f->entry * 0x10 + 0x06]; + } else { + /* we did not find the startcluster, thus the internal + FAT is broken for this file */ + *type = FTYPE_BROKEN; + } } } |