summaryrefslogtreecommitdiffstats
path: root/linenoise
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-01 07:36:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-11-01 07:36:31 -0700
commite0538074552ca48f7c994a49dce12be9210f07d4 (patch)
tree00f14a94246630c227fbdcfb6d551ee23f469ddb /linenoise
parent2c6829c7fdda6d45722dc93e510e2ebbc80ce7bb (diff)
downloadtxr-e0538074552ca48f7c994a49dce12be9210f07d4.tar.gz
txr-e0538074552ca48f7c994a49dce12be9210f07d4.tar.bz2
txr-e0538074552ca48f7c994a49dce12be9210f07d4.zip
linenoise: fix use of int for wide char.
* linenoise/linenoise.c (history_search): The c variable for capturing the input character should be of type wint_t, not int. This was caught by GNU C++, due to a signed/unsigned warning when c was compared to WEOF.
Diffstat (limited to 'linenoise')
-rw-r--r--linenoise/linenoise.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c
index 817d1698..081533a8 100644
--- a/linenoise/linenoise.c
+++ b/linenoise/linenoise.c
@@ -681,7 +681,7 @@ static int history_search(lino_t *l)
const wchar_t *fmt = L"[%ls]%ls";
int ex = wcslen(fmt) - 2*wcslen(L"%ls");
lino_t *lc = lino_copy(l), *ld = lino_copy(l);
- int c = -1;
+ wint_t c = 0;
if (lc == 0 || ld == 0)
goto out;