Patch level :4.0 657
Files correlati : Ricompilazione Demo : [ ] Commento :eliminato pernicioso ciclo infinito nel caricamento di un documento git-svn-id: svn://10.65.10.50/trunk@15098 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a3f8d5d063
commit
2d91f52e51
@ -163,26 +163,27 @@ const TString_array& TTipo_documento::keys_descrs()
|
|||||||
{
|
{
|
||||||
if (_keys_descrs.empty())
|
if (_keys_descrs.empty())
|
||||||
{
|
{
|
||||||
TString16 var, tiporiga;
|
TFilename pn;
|
||||||
TFilename pn; profile_name(pn);
|
profile_name(pn);
|
||||||
TConfig prof(pn);
|
TConfig prof(pn, "RIGHE");
|
||||||
TTipo_riga_documento tr;
|
TTipo_riga_documento tr;
|
||||||
TToken_string k, d;
|
TToken_string k, d;
|
||||||
int i;
|
|
||||||
|
for (int i = 0; ; i++)
|
||||||
|
{
|
||||||
|
const TString& tiporiga(prof.get("Tipo", NULL, i));
|
||||||
|
|
||||||
for (i = 0; ; i++)
|
if (tiporiga.full())
|
||||||
{
|
{
|
||||||
const TString16 tiporiga(prof.get("Tipo", "RIGHE", i));
|
tr.read(tiporiga);
|
||||||
|
k.add(tr.codice());
|
||||||
if (tiporiga.full())
|
d.add(tr.descrizione());
|
||||||
{
|
}
|
||||||
tr.read(tiporiga);
|
else
|
||||||
k.add(tr.codice());
|
break; //esce da un eventuale ciclo infinito
|
||||||
d.add(tr.descrizione());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 0)
|
if (k.blank())
|
||||||
{
|
{
|
||||||
TTable tri("%TRI");
|
TTable tri("%TRI");
|
||||||
|
|
||||||
@ -192,10 +193,11 @@ const TString_array& TTipo_documento::keys_descrs()
|
|||||||
d.add(tri.get("S0"));
|
d.add(tri.get("S0"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_keys_descrs.add(k);
|
|
||||||
_keys_descrs.add(d);
|
_keys_descrs.add(k);
|
||||||
|
_keys_descrs.add(d);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _keys_descrs;
|
return _keys_descrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user