summaryrefslogtreecommitdiffstats
path: root/src/core/ansiesc.c
diff options
context:
space:
mode:
authorMichael Brown2013-12-02 18:20:36 +0100
committerMichael Brown2013-12-02 18:20:36 +0100
commit135bf35b1189a4402dcca13685331c3fb2d901f5 (patch)
treeb95a0652759472957c53f61915062ef28424ee62 /src/core/ansiesc.c
parent[build] Fix building on OpenBSD 5.4 (diff)
downloadipxe-135bf35b1189a4402dcca13685331c3fb2d901f5.tar.gz
ipxe-135bf35b1189a4402dcca13685331c3fb2d901f5.tar.xz
ipxe-135bf35b1189a4402dcca13685331c3fb2d901f5.zip
[console] Allow '?' as an intermediate byte in ANSI escape sequences
The ANSI escape sequences to show and hide the cursor take the form "<ESC>[?25h" and "<ESC>[?25l" respectively. iPXE currently treats the '?' character as the final byte. Fix by explicitly treating '?' as an intermediate byte. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/ansiesc.c')
-rw-r--r--src/core/ansiesc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/ansiesc.c b/src/core/ansiesc.c
index 68e7061b..ca9a73ce 100644
--- a/src/core/ansiesc.c
+++ b/src/core/ansiesc.c
@@ -99,7 +99,8 @@ int ansiesc_process ( struct ansiesc_context *ctx, int c ) {
DBG ( "Too many parameters in ANSI escape "
"sequence\n" );
}
- } else if ( ( c >= 0x20 ) && ( c <= 0x2f ) ) {
+ } else if ( ( ( c >= 0x20 ) && ( c <= 0x2f ) ) ||
+ ( c == '?' ) ) {
/* Intermediate Byte */
ctx->function <<= 8;
ctx->function |= c;