aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib')
-rw-r--r--nx-X11/lib/X11/imLcLkup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/imLcLkup.c b/nx-X11/lib/X11/imLcLkup.c
index 9449b9f43..f2f96e280 100644
--- a/nx-X11/lib/X11/imLcLkup.c
+++ b/nx-X11/lib/X11/imLcLkup.c
@@ -63,6 +63,10 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
unsigned char pattern = ic->private.local.brl_committed;
char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern);
+ if(ret < 0) {
+ if(status) *status = XLookupNone;
+ return(0);
+ }
if(ret > bytes) {
if(status) *status = XBufferOverflow;
return(ret);