aboutsummaryrefslogtreecommitdiff
path: root/termo.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-11-03 02:35:37 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-11-03 02:36:40 +0100
commita9b41e41b7789924465a7e5596a463ed93d8fc26 (patch)
tree30cc88e38373d731d03f45c09bda56f80e0cbfdb /termo.c
parent059cb81817cfa9d56ac4168f738836adf6dd6caa (diff)
downloadtermo-a9b41e41b7789924465a7e5596a463ed93d8fc26.tar.gz
termo-a9b41e41b7789924465a7e5596a463ed93d8fc26.tar.xz
termo-a9b41e41b7789924465a7e5596a463ed93d8fc26.zip
Fix use of an uninitialized value
Diffstat (limited to 'termo.c')
-rw-r--r--termo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/termo.c b/termo.c
index 477242b..469af1d 100644
--- a/termo.c
+++ b/termo.c
@@ -1013,7 +1013,7 @@ peekkey_simple (termo_t *tk, termo_key_t *key, int flags, size_t *nbytep)
// XXX: this way DEL is never recognised as backspace, even if it is
// specified in the terminfo entry key_backspace. Just because it
// doesn't form an escape sequence.
- uint32_t codepoint;
+ uint32_t codepoint = MULTIBYTE_INVALID;
termo_result_t res = parse_multibyte
(tk, tk->buffer + tk->buffstart, tk->buffcount, &codepoint, nbytep);
@@ -1023,7 +1023,6 @@ peekkey_simple (termo_t *tk, termo_key_t *key, int flags, size_t *nbytep)
// caller demands an answer. About the best thing we can do here
// is eat as many bytes as we have, and emit a MULTIBYTE_INVALID.
// If the remaining bytes arrive later, they'll be invalid too.
- codepoint = MULTIBYTE_INVALID;
*nbytep = tk->buffcount;
res = TERMO_RES_KEY;
}