(*ancho) = (*size);
}
memset(tmp1, '.', (*size)-(tmp1-salida));
- salida[*size] = '\0';
+ salida[*size-1] = '\0';
return salida;
}
} else {
cant_header++;
offset += curr_size;
+ fprintf(stderr, "Sume %lu\n", curr_size);
}
- } while (offset < (*size));
+ } while (offset+sizeof(EMUFS_REG_SIZE)+sizeof(EMUFS_REG_ID) < (*size));
/* Proceso */
+ fprintf(stderr, "Cantidad de headers = %d\n", cant_header);
salida = (char *)malloc((*size)-sizeof(unsigned int)*cant_header*3 + 3*cant_header*10+1);
tmp = ptr;
tmp1 = salida;
sprintf(tmp1, "[%08d]", *((unsigned int *)tmp));
tmp1 += 10;
tmp += sizeof(unsigned int);
- j = sizeof(unsigned int);;
+ j = sizeof(unsigned int);
+ PERR("Voy aca");
+ fprintf(stderr, "son %lu\n", curr_size);
while (j < curr_size) {
if (*tmp == '\0') {
if (ant == (*tmp))
tmp1++;
j++;
}
+ PERR("Y hasta todo bien");
i++;
}
/* Tengo que trabajar sobre lo que me falte (seguro es espacio libre) */
(*size) = (*size)-sizeof(unsigned int)*cant_header*3+3*cant_header*10+1;
memset(tmp1, '.', (*size)-(tmp1-salida));
free(ptr);
- salida[*size] = '\0';
+ salida[*size-1] = '\0';
return salida;
}