X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcaptoinfo.c;h=9362105ab795ebd4192e812737ca1e798e0eece9;hp=8b3b83d1823906acb996f245efd773d60a3c6720;hb=790a85dbd4a81d5f5d8dd02a44d84f01512ef443;hpb=3e37c7d3fa122563a9d88168926f61286ef30cd3 diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c index 8b3b83d1..9362105a 100644 --- a/ncurses/tinfo/captoinfo.c +++ b/ncurses/tinfo/captoinfo.c @@ -98,7 +98,7 @@ #include #include -MODULE_ID("$Id: captoinfo.c,v 1.98 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: captoinfo.c,v 1.99 2020/05/25 21:28:29 tom Exp $") #if 0 #define DEBUG_THIS(p) DEBUG(9, p) @@ -216,12 +216,15 @@ cvtchar(register const char *sp) } break; case '^': + len = 2; c = UChar(*++sp); - if (c == '?') + if (c == '?') { c = 127; - else + } else if (c == '\0') { + len = 1; + } else { c &= 0x1f; - len = 2; + } break; default: c = UChar(*sp);