summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Doc/Zsh/mod_curses.yo3
-rw-r--r--Src/Modules/curses.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fc4b3870..28701584d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-15  Clint Adams  <clint@zsh.org>
+
+	* 23957: Doc/Zsh/mod_curses.yo, Src/Modules/curses.c: minor fixes.
+
 2007-10-14  Clint Adams  <clint@zsh.org>
 
 	* unposted: Doc/Zsh/.distfiles, Src/Modules/.distfiles: update for
diff --git a/Doc/Zsh/mod_curses.yo b/Doc/Zsh/mod_curses.yo
index 82b95ff51..a44608289 100644
--- a/Doc/Zsh/mod_curses.yo
+++ b/Doc/Zsh/mod_curses.yo
@@ -26,7 +26,8 @@ The tt(-r) command will refresh window var(targetwin); this is necessary to
 make any pending changes (such as characters you have prepared for output
 with tt(-c)) visible on the screen.
 
-tt(-m) moves var(targetwin) to new coordinates var(new_y) and var(new_x).
+tt(-m) moves the cursor position in var(targetwin) to new coordinates
+var(new_y) and var(new_x).
 
 Outputting characters and strings are achieved by tt(-c) and tt(-s)
 respectively.
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index bfcbeca01..1cc711a2d 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -78,7 +78,7 @@ zcurses_validate_window(char *win, int criteria)
 
     target = (unsigned)atoi(win);
 
-    if (target > ZCURSES_MAX_WINDOWS) {
+    if (target > ZCURSES_MAX_WINDOWS || target < 1) {
 	zc_errno = ZCURSES_ERANGE;
 	return -1;
     }