From b78c322eb9bc1e2e744656c9ba269d47bb6755eb Mon Sep 17 00:00:00 2001 From: luca83 Date: Tue, 18 May 2010 14:48:53 +0000 Subject: [PATCH] Patch level : 10.0 patch ??? Files correlati : ps0713 Ricompilazione Demo : [ ] Commento : Aggiunto un controllo supplementare git-svn-id: svn://10.65.10.50/trunk@20469 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ps/ps0713lib.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ps/ps0713lib.cpp b/ps/ps0713lib.cpp index 911144271..adbd07e44 100755 --- a/ps/ps0713lib.cpp +++ b/ps/ps0713lib.cpp @@ -81,14 +81,19 @@ TCommessa::TCommessa(const char* codcms) rrip.move_first(); TString80 str = rrip.get("CODCONTO").as_string(); - const int gruppo = atoi(str.left(3)); - const int conto = atoi(str.mid(3,3)); - const long sotco = atol(str.right(6)); + const int gruppo = atoi(str.left(3)) > 0 ? atoi(str.left(3)) : 0; + const int conto = atoi(str.mid(3,3)) > 0 ? atoi(str.mid(3,3)) : 0; + const long sotco = atol(str.right(6)) > 0L ? atol(str.right(6)) : 0L; TCommessa_string cms(codcms, gruppo, conto, sotco); _commessa = cms; } + else + { + TCommessa_string cms(0L, 0, 0, 0L); + _commessa = cms; + } }