summaryrefslogtreecommitdiff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/handle.c b/handle.c
index 02a5f41..429b57a 100644
--- a/handle.c
+++ b/handle.c
@@ -889,8 +889,16 @@ do_pointer(char *line, int len)
}
if (i > 0 && i != nbuttons) {
- fprintf (stderr, "Warning: Only changing the first %d of %d buttons.\n",
- i, nbuttons);
+ if (i < nbuttons) {
+ fprintf (stderr,
+ "Warning: Only changing the first %d of %d buttons.\n",
+ i, nbuttons);
+ }
+ else { /* i > nbuttons */
+ fprintf (stderr,
+ "Warning: Not changing %d extra buttons beyond %d.\n",
+ i - nbuttons, nbuttons);
+ }
i = nbuttons;
}