File bsc1190793-63ca9e06.patch of Package ncurses.28806

Based on 63ca9e061f4644795d6f3f559557f3e1ed8c738b Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
Date: Sun, 31 May 2020 00:51:32 +0000
Subject: [PATCH] snapshot of project "ncurses", label v6_2_20200530

---
 ncurses/tinfo/captoinfo.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- ncurses/tinfo/captoinfo.c
+++ ncurses/tinfo/captoinfo.c	2021-10-13 09:33:13.939018028 +0000
@@ -205,8 +205,15 @@ cvtchar(register const char *sp)
 	}
 	break;
     case '^':
-	c = (unsigned char) (*++sp & 0x1f);
 	len = 2;
+	c = UChar(*++sp);
+	if (c == '?') {
+	    c = 127;
+	} else if (c == '\0') {
+	    len = 1;
+	} else {
+	    c &= 0x1f;
+	}
 	break;
     default:
 	c = (unsigned char) (*sp);
openSUSE Build Service is sponsored by