summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r--Src/Zle/zle_misc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 081c720cd..2c7c364a2 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -61,9 +61,13 @@ mod_export int
selfinsert(UNUSED(char **args))
{
#ifdef ZLE_UNICODE_SUPPORT
+ /* wint_t and wchar_t not neccessarily the same size */
+ wchar_t tmp;
+
if (!lastchar_wide_valid)
getrestchar(lastchar);
- doinsert(&lastchar_wide, 1);
+ tmp = lastchar_wide;
+ doinsert(&tmp, 1);
#else
char s = lastchar;
doinsert(&s, 1);
@@ -921,7 +925,7 @@ executenamedcommand(char *prmt)
#ifdef ZLE_UNICODE_SUPPORT
if (!lastchar_wide_valid)
getrestchar(0);
- if (iswcntrl(lastchar))
+ if (iswcntrl(lastchar_wide))
#else
if (icntrl(lastchar))
#endif