From b3cc2229a889bc85ad9d0b97f5d6020e03b38e4d Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Wed, 21 Apr 2021 16:56:29 +0200 Subject: [PATCH] Patch level : 12.0 nopatch Files correlati : --- src/cg/cg4a00.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/cg/cg4a00.cpp b/src/cg/cg4a00.cpp index 9c4c6dc1a..3dd5018be 100755 --- a/src/cg/cg4a00.cpp +++ b/src/cg/cg4a00.cpp @@ -209,16 +209,12 @@ bool TGestAutoTrasp_mask::on_field_event(TOperable_field& o, TField_event e, lon if (e == fe_close) // Controllo sulla presenza dei codici causale nello spreadsheet { TSheet_field& sf = sfield(F_SHEET_CAUSALI); - bool error = TRUE; - for (int i=0; i < sf.items(); i++) + bool error = true; + for (int i = 0; error && i < sf.items(); i++) { - TToken_string& tt = sf.row(i); - const TString16 c = tt.get(F_CAUDEF - F_CAUMOV); - if (!c.blank()) - { - error = FALSE; - break; - } + const TString16 c = sf.get_str_row_cell(i, F_CAUDEF); + + error = c.blank(); } if (error) {