[Scummvm-cvs-logs] CVS: scummvm/backends/ps2/iop/CoDyVDfs/iop codyvdfs.c,1.1.2.1,1.1.2.2 fiofs.c,1.1.2.1,1.1.2.2

Robert Göffringmann lavosspawn at users.sourceforge.net
Fri Nov 18 08:10:10 CET 2005


Update of /cvsroot/scummvm/scummvm/backends/ps2/iop/CoDyVDfs/iop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5239/backends/ps2/iop/CoDyVDfs/iop

Modified Files:
      Tag: branch-0-8-0
	codyvdfs.c fiofs.c 
Log Message:
fixed some FS bugs

Index: codyvdfs.c
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/ps2/iop/CoDyVDfs/iop/Attic/codyvdfs.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- codyvdfs.c	17 Nov 2005 01:52:47 -0000	1.1.2.1
+++ codyvdfs.c	18 Nov 2005 15:58:10 -0000	1.1.2.2
@@ -99,7 +99,7 @@
 	for (i = 0; i < NUM_SECTORS(cachedDirSize); i++) {
 		entry = (ISODirectoryRecord *)cacheBuf;
 		if (i != cachedDirOfs) {
-			if (cdReadSectors(cachedDirLba + cachedDirOfs, 1, cacheBuf, &rmode) < 0)
+			if (cdReadSectors(cachedDirLba + i, 1, cacheBuf, &rmode) < 0)
 				return NULL;
             cachedDirOfs = i;
 		}
@@ -143,7 +143,7 @@
 		else
 			pathPos = findEntryInCache(path, strlen(path));
 
-		if (pathPos && tok && IS_DIR(pathPos))
+		if (pathPos && tok && tok[1] && IS_DIR(pathPos))
 			if (cacheEnterDir(pathPos) < 0)
 				return NULL;
 

Index: fiofs.c
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/ps2/iop/CoDyVDfs/iop/Attic/fiofs.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- fiofs.c	17 Nov 2005 01:52:47 -0000	1.1.2.1
+++ fiofs.c	18 Nov 2005 15:58:10 -0000	1.1.2.2
@@ -226,13 +226,14 @@
 	int i;
 	for (i = hd->lbaOfs; i < NUM_SECTORS(hd->size); i++) {
 		if (i != hd->lbaOfs) {
-			hd->lbaOfs = i;
 			cdReadSectors(hd->lba + i, 1, hd->buf, &rmode);
+			hd->lbaOfs = i;
+			hd->curOfs = 0;
 		}
 		while ((hd->curOfs < SECTOR_SIZE) && ((ISODirectoryRecord *)(hd->buf + hd->curOfs))->len_dr) {
 			rec = (ISODirectoryRecord *)(hd->buf + hd->curOfs);
 			hd->curOfs += rec->len_dr;
-			if ((rec->len_fi != 1) || ((rec->name[0] == 0) && (rec->name[0] == 1))) { // skip '.' / '..'
+			if ((rec->len_fi != 1) || ((rec->name[0] != 0) && (rec->name[0] != 1))) { // skip '.' / '..'
 				memcpy(buf->name, rec->name, rec->len_fi);
 				if ((buf->name[rec->len_fi - 2] == ';') && (buf->name[rec->len_fi - 1] == '1'))
 					buf->name[rec->len_fi - 2] = '\0';





More information about the Scummvm-git-logs mailing list