Bug fix: -modesty_on_drive properties timeout_sec, min_usec, max_usec read wrong numbers from the parameter text

This commit is contained in:
Thomas Schmitt 2016-03-01 14:15:17 +00:00
parent 155bad70a7
commit fc66631257
2 changed files with 12 additions and 9 deletions

View File

@ -860,25 +860,28 @@ bad_percent:;
ppt= cpt + 12;
set_min= 0;
goto set_size_percent;
} else if(l >= 8 && strncmp(cpt, "min_usec=", 8) == 0) {
ppt= cpt + 8;
} else if(l >= 9 && strncmp(cpt, "min_usec=", 9) == 0) {
ppt= cpt + 9;
set_min= 1;
set_sec:;
num= -1;
sscanf(ppt, "%d", &num);
if(num < 0)
num= 0;
if(set_min == 1)
if(set_min == 2)
xorriso->max_buffer_usec= num;
else if(set_min == 1)
xorriso->min_buffer_usec= num;
else if(set_min == 0)
xorriso->max_buffer_percent= num;
else
xorriso->buffer_timeout_sec= num;
} else if(l >= 8 && strncmp(cpt, "max_usec=", 8) == 0) {
ppt= cpt + 8;
set_min= 0;
} else if(l >= 9 && strncmp(cpt, "max_usec=", 9) == 0) {
ppt= cpt + 9;
set_min= 2;
goto set_sec;
} else if(l >= 11 && strncmp(cpt, "timeout_sec=", 11) == 0) {
ppt= cpt + 11;
} else if(l >= 12 && strncmp(cpt, "timeout_sec=", 12) == 0) {
ppt= cpt + 12;
set_min= -1;
goto set_sec;
} else {

View File

@ -1 +1 @@
#define Xorriso_timestamP "2016.02.27.170008"
#define Xorriso_timestamP "2016.03.01.141456"