- (*tmp1) = '\0';
- (*size) = (*size)-sizeof(unsigned int)*cant_header*2+2*cant_header*10+1;
- (*ancho) = sizeof(t_Articulo)-sizeof(unsigned int)*2+20;
+
+ if (emu->tam_bloque > emu->tam_reg) {
+ (*size) = (*size)-sizeof(unsigned int)*cant_header*2+2*cant_header*10+1;
+ (*ancho) = sizeof(t_Articulo)-sizeof(unsigned int)*2+20+1;
+ } else {
+ (*size) = (*size)-sizeof(EMUFS_REG_ID)-sizeof(unsigned int)+21;
+ (*ancho) = (*size);
+ }
+ memset(tmp1, '.', (*size)-(tmp1-salida));
+ salida[*size-1] = '\0';
+