Fix jump into hyperspace
authorhpa <hpa>
Wed, 4 Feb 2004 04:07:55 +0000 (04:07 +0000)
committerhpa <hpa>
Wed, 4 Feb 2004 04:07:55 +0000 (04:07 +0000)
menu/startup.S16

index 63f31c0..ccdc776 100644 (file)
@@ -17,13 +17,13 @@ _start:
        /* Normalize the command line.  At startup 0x80 = length and
           the command line starts at 0x81, but with whitespace */
        movl $0x81,%esi
-       movzbl (0x80),%ebx
+       movzbw (0x80),%bx
        movb $0,(%bx,%si)               /* Null-terminate the string */
 1:
        lodsb
        dec %al                         /* Stop on null */
        cmp $31,%al                     /* Whitespace? */
-       jbe 1
+       jbe 1b
        dec %si                         /* Unskip first character */
 
        /* Invoke _cstart */