SCP: Add support for unsigned int parsing (t_value) without a range limit

This commit is contained in:
Mark Pizzolato 2017-07-31 22:11:44 -07:00
parent b15f753adc
commit e39965a9f6

2
scp.c
View file

@ -8176,7 +8176,7 @@ CONST char *tptr;
*status = SCPE_OK;
val = strtotv ((CONST char *)cptr, &tptr, radix);
if ((cptr == tptr) || (val > max))
if ((cptr == tptr) || ((max > 0) && (val > max)))
*status = SCPE_ARG;
else {
while (sim_isspace (*tptr)) tptr++;