From db5453f96184c9b2229f97b18801ebbbb8b19533 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Thu, 23 Dec 2021 16:18:12 +0100 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:=2012.?= =?UTF-8?q?0=201102=20Files=20correlati=20=20=20=20=20:=20ve0.exe=20ve1.ex?= =?UTF-8?q?e=20ve5.exe=20ve6.exe=20Commento=20:=20Patch=20Migliorata=20sta?= =?UTF-8?q?mpa=20dei=20campi=20su=20pi=C3=B9=20righe=20e=20con=20altezza?= =?UTF-8?q?=20automatica=20(es=20descrizione=20riga=20fattura)=20con=20des?= =?UTF-8?q?crizioni=20molto=20lunghe=20e=20on=20a=20capo=20nella=20descriz?= =?UTF-8?q?ione.=20Il=20salvataggio=20del=20plafond=20salvava=20anch=20i?= =?UTF-8?q?=20plafond=20con=20utilizzo=200.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Interno provare stampa fatture con righe che abbiano queste caratteristiche. --- src/include/strings.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/include/strings.cpp b/src/include/strings.cpp index c105e71b3..9cadae7bd 100755 --- a/src/include/strings.cpp +++ b/src/include/strings.cpp @@ -1968,11 +1968,10 @@ void TToken_string::destroy(int n) { if (_last == -2) return ; + if (items() == 1 && n == 0) // sto cancellando l'unco item + n = -1; if (n < 0) - { - char* s = strrchr(_str, _separator); - if (s != NULL) *s = '\0'; - } + *_str = '\0'; else { int sep = 0; @@ -1984,7 +1983,7 @@ void TToken_string::destroy(int n) { const char* p = strchr(s, _separator); - if (p != NULL) + if (p != nullptr) { *s = '\0'; strcat(s, p + 1);