Index: stand/i386/boot2/boot2.c =================================================================== --- stand/i386/boot2/boot2.c +++ stand/i386/boot2/boot2.c @@ -387,10 +387,11 @@ #if SERIAL } else if (c == 'S') { j = 0; - while (*arg <= '9') { - i = (unsigned int)(*arg - '0'); + i = (int)(*arg - '0'); + while (i >= 0 && i <= 9) { j = j * 10 + i; arg++; + i = (int)(*arg - '0'); } if (j > 0 && i == -'0') { comspeed = j;