ungetc is not cleared on error?
Current git:
$ ;l dash: 1: Syntax error: ";" unexpected $ s COPYING ChangeLog.O Makefile.am aclocal.m4 autom4te.cache config.h config.log configure dash dollar_altvalue1.tests missing stamp-h1 ChangeLog Makefile Makefile.in autogen.sh compile config.h.in config.status configure.ac depcomp install-sh src trace
PATCH 1/1 input: Clear unget on RESET
Quoted 11 lines · Denys Vlasenko
Current git:
$ ;l dash: 1: Syntax error: ";" unexpected $ s COPYING ChangeLog.O Makefile.am aclocal.m4 autom4te.cache config.h config.log configure dash dollar_altvalue1.tests missing stamp-h1 ChangeLog Makefile Makefile.in autogen.sh compile config.h.in config.status configure.ac depcomp install-sh src trace
This patch fixes it by clearing ungetc on RESET.
Fixes 17db43b58415 ("input: Allow two consecutive calls to pungetc")
Reported-by Denys Vlasenko <[email protected]>
Signed-off-by Herbert Xu <[email protected]>
src/input.c +1 -0
@@ -87,6 +87,7 @@ INIT { RESET {/* clear input buffer */ basepf.lleft = basepf.nleft =0 ; + basepf.unget =0 ;popallfiles (); }
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt