diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-12-24 06:41:46 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-12-24 12:04:31 -0800 |
commit | 0b4f7bf4c47c3be30a74b2a18c513af810df26cb (patch) | |
tree | 6eca08340714847ca2e012b0db64513c97423705 /linenoise | |
parent | d236fbed3338996fd6ed7791178f5c1972864b50 (diff) | |
download | txr-0b4f7bf4c47c3be30a74b2a18c513af810df26cb.tar.gz txr-0b4f7bf4c47c3be30a74b2a18c513af810df26cb.tar.bz2 txr-0b4f7bf4c47c3be30a74b2a18c513af810df26cb.zip |
linenoise: fix: int used instead of wchar_t.
* linenoise.c (scan_match_rev, scan_match_fwd): The value of
s[i] must be captured in a wchar_t, not int.
Diffstat (limited to 'linenoise')
-rw-r--r-- | linenoise/linenoise.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index 4a624ad9..50830bef 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -1303,7 +1303,7 @@ static void move_cursor(lino_t *l, int npos) static int scan_match_rev(const wchar_t *s, int i, wchar_t mch) { while (i > 0) { - int ch = s[--i]; + wchar_t ch = s[--i]; if (ch == mch) return i; @@ -1348,7 +1348,7 @@ static int scan_rev(const wchar_t *s, int i) static int scan_match_fwd(const wchar_t *s, int i, wchar_t mch) { while (s[++i]) { - int ch = s[i]; + wchar_t ch = s[i]; if (ch == mch) return i; |