From: Ricardo Markiewicz Date: Thu, 8 Apr 2004 21:47:43 +0000 (+0000) Subject: * BUGFIX: inicializo id en -1 X-Git-Tag: svn_import_r684~603 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/aefc56334e3d677ea597d8268f8a6f203acde2cd * BUGFIX: inicializo id en -1 --- diff --git a/emufs/idx.c b/emufs/idx.c index 87f5c3c..4d9536e 100644 --- a/emufs/idx.c +++ b/emufs/idx.c @@ -48,6 +48,7 @@ int emufs_idx_buscar_mayor_id(EMUFS *emu) strcat(name_f_idx,".idx"); if ( (f_idx = fopen(name_f_idx,"r")) == NULL) return -1; /*ERROR*/ + id = -1; while ( !feof(f_idx) ){ /* Me aseguro de leer la cantidad de bytes correcta */ if (fread(®,sizeof(BLOCK_REG_T),1,f_idx) != 1) continue; @@ -59,3 +60,4 @@ int emufs_idx_buscar_mayor_id(EMUFS *emu) return id; } +