summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/curses.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b8eba08f6..9577b14d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-29  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* Sebastian: 39354: Src/Modules/curses.c: alter internal return
+	code so as not to mask curses error code.
+
 2016-04-26  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 38350 (cf. Glenn Smith: 38348): Src/exec.c: Remove-all warning
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index a04841a85..7fff858f4 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -324,7 +324,7 @@ zcurses_color(const char *color)
 	    return (short)zc->number;
 	}
 
-    return (short)-1;
+    return (short)-2;
 }
 
 static Colorpairnode
@@ -353,10 +353,10 @@ zcurses_colorget(const char *nam, char *colorpair)
 	f = zcurses_color(cp);
 	b = zcurses_color(bg+1);
 
-	if (f==-1 || b==-1) {
-	    if (f == -1)
+	if (f==-2 || b==-2) {
+	    if (f == -2)
 		zwarnnam(nam, "foreground color `%s' not known", cp);
-	    if (b == -1)
+	    if (b == -2)
 		zwarnnam(nam, "background color `%s' not known", bg+1);
 	    *bg = '/';
 	    zsfree(cp);