changeset 1602:f0c4c8771cd4

* xselect.c (Fx_get_cut_buffer): Correct check for buf_num in range. * xselect.c (Fx_get_cut_buffer, Fx_set_cut_buffer): Fix error message format; use NUM_CUT_BUFFERS instead of literal 7.
author Jim Blandy <jimb@redhat.com>
date Mon, 16 Nov 1992 01:04:24 +0000
parents a371ec79bc31
children 3e621a2a9cfe
files src/=xselect.c.old
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/=xselect.c.old	Mon Nov 16 01:03:16 1992 +0000
+++ b/src/=xselect.c.old	Mon Nov 16 01:04:24 1992 +0000
@@ -808,8 +808,8 @@
       buf_num = XINT (n);
     }
 
-  if (buf_num < 0 && buf_num > NUM_CUT_BUFFERS)
-    error ("cut buffer numbers must be from zero to seven.");
+  if (buf_num < 0 || buf_num >= NUM_CUT_BUFFERS)
+    error ("cut buffer numbers must be from zero to seven");
 
   {
     Lisp_Object value;
@@ -859,8 +859,8 @@
 
   buf_num = XINT (n);
 
-  if (buf_num < 0 || buf_num > 7)
-    error ("cut buffer numbers must be from zero to seven.");
+  if (buf_num < 0 || buf_num >= NUM_CUT_BUFFERS)
+    error ("cut buffer numbers must be from zero to seven");
 
   BLOCK_INPUT;