Modificato il caricamento dei livelli di giacenza. Dava un errore nel caso la
tabella fosse vuota. git-svn-id: svn://10.65.10.50/trunk@5697 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
57926e6be7
commit
87b1ddbd16
@ -598,23 +598,23 @@ void TCodice_livelli::load(bool enabled, const char *tabname,const char *tabgrp)
|
|||||||
|
|
||||||
_lev_enabled = enabled;
|
_lev_enabled = enabled;
|
||||||
_last_level=0;
|
_last_level=0;
|
||||||
e=_tabformato.first();
|
|
||||||
for (int i=0; i < MANY_MAG_LEV; i++)
|
for (int i=0; i < MANY_MAG_LEV; i++)
|
||||||
{
|
{
|
||||||
if ((e==NOERR) && _lev_enabled)
|
_name[i]="";
|
||||||
|
_code_length[i]=0;
|
||||||
|
_picture[i]="";
|
||||||
|
}
|
||||||
|
if (_lev_enabled)
|
||||||
|
{
|
||||||
|
e = _tabformato.first();
|
||||||
|
for (int i=0; e == NOERR && i < MANY_MAG_LEV; i++)
|
||||||
{
|
{
|
||||||
_name[i]=_tabformato.get("S0");
|
_name[i]=_tabformato.get("S0");
|
||||||
_picture[i]=_tabformato.get("S1");
|
_picture[i]=_tabformato.get("S1");
|
||||||
_code_length[i]=TMetachar::maxstrlen(_picture[i]);
|
_code_length[i]=TMetachar::maxstrlen(_picture[i]);
|
||||||
_last_level=i+1;
|
_last_level=i+1;
|
||||||
}
|
e = _tabformato.next();
|
||||||
else
|
|
||||||
{
|
|
||||||
_name[i]="";
|
|
||||||
_code_length[i]=0;
|
|
||||||
_picture[i]="";
|
|
||||||
}
|
}
|
||||||
e=_tabformato.next();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_gruppi == NULL)
|
if (_gruppi == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user