Unbreak the code for non-digits below '0' by casting the expression

to unsigned int.

Pointed out by: bde
This commit is contained in:
Roman Divacky 2014-11-30 08:43:55 +00:00
parent 3c4ee9781a
commit 6e52f863ee

View File

@ -418,7 +418,7 @@ parse()
#if SERIAL
} else if (c == 'S') {
j = 0;
while ((i = *arg++ - '0') <= 9)
while ((unsigned int)(i = *arg++ - '0') <= 9)
j = j * 10 + i;
if (j > 0 && i == -'0') {
comspeed = j;