X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/2fc4ee372f0fa46b11c7aeedfdae9e8fc113edbf..18ff567719ef1e5437bef12b937fe95686c336b5:/emufs/fsc.c?ds=sidebyside diff --git a/emufs/fsc.c b/emufs/fsc.c index 05e29a8..73f043d 100644 --- a/emufs/fsc.c +++ b/emufs/fsc.c @@ -453,7 +453,8 @@ EMUFS_FREE emufs_fsc_get_total_fs(EMUFS *emu) total = 0; while ( !feof(f_fsc) ){ if ( fread(®, sizeof(EMUFS_FSC), 1, f_fsc) != 1) continue; - total += reg.freespace; + if ( reg.freespace > 0 ) + total += reg.freespace; } 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); } -