Corretta l'apertura del file di history per togliere
unexepected quickwin error sulla conversione. git-svn-id: svn://10.65.10.50/trunk@3077 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
cbf4689bfe
commit
3aa3ddcb5a
@ -347,14 +347,16 @@ void TManutenzione_app::open_history()
|
||||
{
|
||||
char line[16];
|
||||
fgets(line,16,fp);
|
||||
line[strlen(line) -1] = '\0';
|
||||
if (strlen(line)==0) _history_firm = -1;
|
||||
int l = strlen(line);
|
||||
|
||||
line[l > 0 ? l -1 : 0 ] = '\0';
|
||||
if (l==0) _history_firm = -1;
|
||||
else
|
||||
_history_firm = atol(line);
|
||||
}
|
||||
else
|
||||
{
|
||||
fopen(History_file,"w");
|
||||
fp = fopen(History_file,"w");
|
||||
_history_firm = -1;
|
||||
}
|
||||
fclose (fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user