X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d4f0853a534fc4283fa38cf4bb4a70cc614283ec..e3732c644048acf96b9cae2b382d93eb45725d96:/emufs/fsc.c diff --git a/emufs/fsc.c b/emufs/fsc.c index 4aaaa17..95d378a 100644 --- a/emufs/fsc.c +++ b/emufs/fsc.c @@ -125,7 +125,10 @@ int emufs_fsc_agregar_gap(EMUFS *emu, EMUFS_OFFSET marker, EMUFS_FREE freespace) /* Busco el gap que sucede a este */ fseek(f_fsc,0,SEEK_SET); while (!feof(f_fsc)) { - fread(&gap_aux,sizeof(EMUFS_FSC),1,f_fsc); + if (fread(&gap_aux,sizeof(EMUFS_FSC),1,f_fsc) != 1) { + if (feof(f_fsc)) break; + PERR("error al leer archivo fsc"); + } if (gap_aux.marker > gap_new.marker) { found = 1; break;