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

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, 6 insertions(+), 3 deletions(-)

--- ncurses/tinfo/captoinfo.c
+++ ncurses/tinfo/captoinfo.c	2021-10-13 09:23:41.597110283 +0000
@@ -215,12 +215,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);
openSUSE Build Service is sponsored by