Patch level :10.0 670

Files correlati     :ve0
Ricompilazione Demo : [ ]
Commento            :
sistemate alcune cosette che facevano morire ve0 nel caso di elaborazione con articolo senza unità di misura principale


git-svn-id: svn://10.65.10.50/trunk@20214 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2010-03-09 14:22:42 +00:00
parent 51b01c0842
commit 40277f3c47
2 changed files with 11 additions and 4 deletions

View File

@ -2451,12 +2451,18 @@ void TFieldref::write(const char* val, TRectype& rec) const
buffer = rec.get(_name); buffer = rec.get(_name);
if (_to <= _from) if (_to <= _from)
((TFieldref*)this)->_to = rec.length(_name); ((TFieldref*)this)->_to = rec.length(_name);
buffer.overwrite(val, _from, _to - _from); if (val && *val)
rec.put(_name, buffer); {
buffer.overwrite(val, _from, _to - _from);
rec.put(_name, buffer);
}
} }
else else
{ {
rec.put(_name, val); if (val && *val)
rec.put(_name, val);
else
rec.zero(_name);
} }
} }

View File

@ -975,7 +975,8 @@ TString& TString::overwrite(
// //
// @xref <mf TString::insert> // @xref <mf TString::insert>
{ {
if (lung == 0) lung=strlen(s); if (lung == 0 && s != NULL)
lung=strlen(s);
if (s || lung) if (s || lung)
{ {
const int l = len(); const int l = len();