X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/e07c148dfae82742f52e3b2dd55db9dafa284925..3332d5c33b1aa5a376cf61cafaf8ffecf7789903:/emufs_gui/viewer.c?ds=inline diff --git a/emufs_gui/viewer.c b/emufs_gui/viewer.c index 750d344..8657d83 100644 --- a/emufs_gui/viewer.c +++ b/emufs_gui/viewer.c @@ -526,7 +526,7 @@ char *procesar_registro_articulo_tipo3(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *si (*ancho) = (*size); } memset(tmp1, '.', (*size)-(tmp1-salida)); - salida[*size-1] = '\0'; + salida[*size-2] = '\0'; return salida; } @@ -612,7 +612,7 @@ char *procesar_registro_articulo_tipo1(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *si (*size) = (*size)-sizeof(unsigned int)*cant_header*3+3*cant_header*10+1; memset(tmp1, '.', (*size)-(tmp1-salida)); free(ptr); - salida[*size-1] = '\0'; + salida[*size-2] = '\0'; return salida; } @@ -854,7 +854,7 @@ char *procesar_registro_factura_tipo1(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *siz } j = 0; PERR("Voy por la data"); - while (j < (tam_data-cant_items*sizeof(t_Item))) { + while (j < (tam_data-cant_items*sizeof(t_Item)-1)) { if (*tmp == '\0') { if (ant == (*tmp)){ (*tmp1) = '.';