summaryrefslogtreecommitdiff
path: root/core/getc.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-03-20 13:41:58 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2009-03-20 13:41:58 -0700
commitec90083cc6f7513d68807e19f893dbb27d2a45aa (patch)
treecdd7ac92d3d46bc30ae52965621464bfbc451d26 /core/getc.inc
parent2653670c79b4ac954c1907b627a7a2a97664de7d (diff)
downloadsyslinux-ec90083cc6f7513d68807e19f893dbb27d2a45aa.tar.gz
getc: move parseint_esdi out of the getint control flow
parseint_esdi was located in the middle of the getint -> parseint fall through, with expectedly disastrous results.
Diffstat (limited to 'core/getc.inc')
-rw-r--r--core/getc.inc29
1 files changed, 14 insertions, 15 deletions
diff --git a/core/getc.inc b/core/getc.inc
index 4c273a2b..3fb88566 100644
--- a/core/getc.inc
+++ b/core/getc.inc
@@ -242,21 +242,6 @@ getint:
.loaded: mov byte [di],0
mov si,NumBuf
; Fall through to parseint
-
-;
-; parseint_esdi:
-; Same as parseint, but takes the input in ES:DI
-;
-parseint_esdi:
- push ds
- push es
- pop ds
- xchg si,di
- call parseint
- xchg si,di
- pop ds
- ret
-
;
; parseint: Convert an integer to a number in EBX
; Get characters from string in DS:SI
@@ -413,3 +398,17 @@ getline:
stosb
.xret: popf
ret
+
+;
+; parseint_esdi:
+; Same as parseint, but takes the input in ES:DI
+;
+parseint_esdi:
+ push ds
+ push es
+ pop ds
+ xchg si,di
+ call parseint
+ xchg si,di
+ pop ds
+ ret