]> git.llucax.com Git - z.facultad/75.06/emufs.git/blobdiff - emufs/idx.c
* BUGFIX : EN idx_get faltaba un sizeof(EMUFS_REG_ID) (aunque el valgrind se sigue...
[z.facultad/75.06/emufs.git] / emufs / idx.c
index 35ebcf452dad9ac71fb55f807221cb60fa4ab6b5..3362331adfafd74782a4099f6441669296ac27e1 100644 (file)
@@ -216,7 +216,7 @@ EMUFS_REG_ID *emufs_idx_get(EMUFS *emu, EMUFS_REG_ID *cant)
                if (fread(&reg, sizeof(EMUFS_IDX), 1, f_idx) != 1) continue;
                count++;
                /* TODO : Verificar errores :-D */
-               tmp = realloc(tmp, count);
+               tmp = realloc(tmp, count*sizeof(EMUFS_REG_ID));
                tmp[count-1] = reg.id_reg;
        }
        fclose(f_idx);