X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/31b934fa103ee83daab587bb09bf9d7d05a054cb..1a91316f990d419553dcad3b40074f6484d28b28:/emufs_gui/registros.c diff --git a/emufs_gui/registros.c b/emufs_gui/registros.c index 983858d..babea55 100644 --- a/emufs_gui/registros.c +++ b/emufs_gui/registros.c @@ -463,7 +463,7 @@ char *procesar_registro_factura_tipo3(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *siz tam_data = emu->tam_reg-sizeof(int)*3-sizeof(float)-sizeof(EMUFS_BLOCK_ID); } else { cant_header = 1; - tam_data = *size - sizeof(EMUFS_REG_ID)-sizeof(unsigned int); + tam_data = (*size) - sizeof(EMUFS_REG_ID)-sizeof(int)*3-sizeof(float)-sizeof(EMUFS_BLOCK_ID); } fprintf(stderr, "Tengo %d headers\n", cant_header); @@ -477,10 +477,12 @@ char *procesar_registro_factura_tipo3(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *siz } tmp = ptr; pos_actualizada = 0; + (*ancho) = 0; while (itam_bloque > emu->tam_reg) { (*size) = tmp1-salida; - (*ancho) = tam_data + 15*cant_header + cant_items*10 - cant_items*sizeof(int); } else { - (*size) = (*size)-sizeof(EMUFS_REG_ID)-sizeof(unsigned int)+21; - (*ancho) = (*size); + (*size) = tmp1-salida; + (*ancho) = tmp1-salida; } - memset(tmp1, '.', (*size)-(tmp1-salida)); salida[*size-1] = '\0'; return salida;