From d92b78bef269069562805ff75bc80c7c111028ee Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 18 Apr 2004 05:00:03 +0000 Subject: [PATCH] bugfix. --- emufs/fsc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.43.0