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())
|
||||
{
|
||||
TString16 var, tiporiga;
|
||||
TFilename pn; profile_name(pn);
|
||||
TConfig prof(pn);
|
||||
TTipo_riga_documento tr;
|
||||
TFilename pn;
|
||||
profile_name(pn);
|
||||
TConfig prof(pn, "RIGHE");
|
||||
TTipo_riga_documento tr;
|
||||
TToken_string k, d;
|
||||
int i;
|
||||
|
||||
for (int i = 0; ; i++)
|
||||
{
|
||||
const TString& tiporiga(prof.get("Tipo", NULL, i));
|
||||
|
||||
for (i = 0; ; i++)
|
||||
{
|
||||
const TString16 tiporiga(prof.get("Tipo", "RIGHE", i));
|
||||
|
||||
if (tiporiga.full())
|
||||
{
|
||||
tr.read(tiporiga);
|
||||
k.add(tr.codice());
|
||||
d.add(tr.descrizione());
|
||||
}
|
||||
if (tiporiga.full())
|
||||
{
|
||||
tr.read(tiporiga);
|
||||
k.add(tr.codice());
|
||||
d.add(tr.descrizione());
|
||||
}
|
||||
else
|
||||
break; //esce da un eventuale ciclo infinito
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
if (k.blank())
|
||||
{
|
||||
TTable tri("%TRI");
|
||||
|
||||
@ -192,10 +193,11 @@ const TString_array& TTipo_documento::keys_descrs()
|
||||
d.add(tri.get("S0"));
|
||||
}
|
||||
}
|
||||
_keys_descrs.add(k);
|
||||
_keys_descrs.add(d);
|
||||
|
||||
_keys_descrs.add(k);
|
||||
_keys_descrs.add(d);
|
||||
|
||||
}
|
||||
|
||||
return _keys_descrs;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user