X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/4c6d9fa59f147b866ca1caee571c646d78286b10..18ff567719ef1e5437bef12b937fe95686c336b5:/emufs/tipo2.c diff --git a/emufs/tipo2.c b/emufs/tipo2.c index e0c3aba..1858c75 100644 --- a/emufs/tipo2.c +++ b/emufs/tipo2.c @@ -478,12 +478,12 @@ void* emufs_tipo2_leer_registro_raw(EMUFS *efs, EMUFS_REG_ID id, EMUFS_REG_SIZE fseek(f_data,reg_offset+sizeof(EMUFS_REG_ID), SEEK_SET); fread(size,sizeof(EMUFS_REG_SIZE),1,f_data); registro = (char*)malloc(*size+sizeof(EMUFS_REG_ID)+sizeof(EMUFS_REG_SIZE)+100); - if (reg_offset > 50) { + if (reg_offset >= 50) { fseek(f_data, reg_offset - 50, SEEK_SET); (*pos) = 50; } else { /* Si no hay 50 antes mio, estoy cerca del 0! */ - (*pos) = 50 - reg_offset; + (*pos) = reg_offset; fseek(f_data, 0, SEEK_SET); } (*size) += sizeof(EMUFS_REG_ID)+sizeof(EMUFS_REG_SIZE)+100;