]> git.llucax.com Git - z.facultad/75.06/emufs.git/blobdiff - emufs/fsc.c
* bugfixes
[z.facultad/75.06/emufs.git] / emufs / fsc.c
index 05e29a843758dd9e5e4fb8e77dbb162203f88439..73f043d6a9b258daac482c0370e58ebdd87e33f8 100644 (file)
@@ -453,7 +453,8 @@ EMUFS_FREE emufs_fsc_get_total_fs(EMUFS *emu)
        total = 0;
        while ( !feof(f_fsc) ){
                if ( fread(&reg, sizeof(EMUFS_FSC), 1, f_fsc) != 1) continue;
        total = 0;
        while ( !feof(f_fsc) ){
                if ( fread(&reg, sizeof(EMUFS_FSC), 1, f_fsc) != 1) continue;
-               total += reg.freespace;
+               if ( reg.freespace > 0 )
+                       total += reg.freespace;
        }
        fclose(f_fsc);
        return total;
        }
        fclose(f_fsc);
        return total;
@@ -575,4 +576,3 @@ long emufs_fsc_get_file_size(EMUFS* efs, int* err)
        strcat(name, EMUFS_FSC_EXT);
        return emufs_common_get_file_size(name, err);
 }
        strcat(name, EMUFS_FSC_EXT);
        return emufs_common_get_file_size(name, err);
 }
-