projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc32747
)
getc: make sure EOF is "sticky"
author
H. Peter Anvin
<hpa@zytor.com>
Wed, 23 May 2007 05:46:25 +0000
(22:46 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Wed, 23 May 2007 05:46:25 +0000
(22:46 -0700)
Make sure to keep all the counters at zero if we hit EOF, so that
subsequent calls will also hit EOF (we rely on that in some places.)
getc.inc
patch
|
blob
|
history
diff --git
a/getc.inc
b/getc.inc
index
2db6858
..
610d01b
100644
(file)
--- a/
getc.inc
+++ b/
getc.inc
@@
-148,6
+148,11
@@
getc:
jmp .got_data
.empty:
+ ; CX == 0 at this point; gc_bufbytes was clobbered
+ ; by the subtract; we need to restore it to zero so
+ ; we will continue to get EOF on any further attempts
+ ; to read the file.
+ mov [di+gc_bufbytes],cx
popad
stc
jmp .ret