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:
alex 1997-12-05 11:44:55 +00:00
parent 57926e6be7
commit 87b1ddbd16

View File

@ -598,23 +598,23 @@ void TCodice_livelli::load(bool enabled, const char *tabname,const char *tabgrp)
_lev_enabled = enabled;
_last_level=0;
e=_tabformato.first();
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");
_picture[i]=_tabformato.get("S1");
_code_length[i]=TMetachar::maxstrlen(_picture[i]);
_last_level=i+1;
}
else
{
_name[i]="";
_code_length[i]=0;
_picture[i]="";
e = _tabformato.next();
}
e=_tabformato.next();
}
if (_gruppi == NULL)