X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/e07c148dfae82742f52e3b2dd55db9dafa284925..a8dad3d5bafadb9bca3335952462f05192a5059c:/emufs_gui/viewer.c diff --git a/emufs_gui/viewer.c b/emufs_gui/viewer.c index 750d344..bcae4bd 100644 --- a/emufs_gui/viewer.c +++ b/emufs_gui/viewer.c @@ -4,6 +4,7 @@ #include "articulos.h" #include "facturas.h" #include "gui.h" +#include "common.h" /* Se encarga de reemplazar los \0 un caracter visual, y segurar un \0 al final */ static char *procesar_registro_articulo_tipo3(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *size, int *pos_actual, int *ancho); @@ -526,7 +527,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 +613,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; }