X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/a7a781b6b1a260c882ad779a9ecdaa517d1a6846..e0b2f02fb7880eb26e4fc28e85253dc56b6c6aab:/emufs/fsc.c?ds=inline diff --git a/emufs/fsc.c b/emufs/fsc.c index 0a5ba22..692d6d1 100644 --- a/emufs/fsc.c +++ b/emufs/fsc.c @@ -101,9 +101,9 @@ int emufs_fsc_buscar_lugar(EMUFS *emu, unsigned long tam, int *fs) *fs = emu->tam_bloque; while( !feof(f_fsc) ){ if (fread(®,sizeof(EMUFS_FSC),1,f_fsc) != 1) continue; - if ( reg.free_space >= tam+sizeof(int)) + if (reg.free_space >= tam) { break; - else { + } else { reg.block = -1; *fs = emu->tam_bloque; } @@ -135,3 +135,4 @@ int emufs_fsc_get_fs(EMUFS *emu, int num_bloque) fclose(f_fsc); return reg.free_space; } +