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
This commit is contained in:
luca83 2010-05-18 14:48:53 +00:00
parent 533186853e
commit b78c322eb9

View File

@ -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;
}
}