Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libterminfo Fix two other off-by-one errors when process...



details:   https://anonhg.NetBSD.org/src/rev/7c6a8bb7241e
branches:  trunk
changeset: 763104:7c6a8bb7241e
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Mar 10 10:46:33 2011 +0000

description:
Fix two other off-by-one errors when processing %P and %g commands.

diffstat:

 lib/libterminfo/tparm.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 3d6390afd9d0 -r 7c6a8bb7241e lib/libterminfo/tparm.c
--- a/lib/libterminfo/tparm.c   Thu Mar 10 10:17:19 2011 +0000
+++ b/lib/libterminfo/tparm.c   Thu Mar 10 10:46:33 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tparm.c,v 1.3 2011/03/10 09:45:32 roy Exp $ */
+/* $NetBSD: tparm.c,v 1.4 2011/03/10 10:46:33 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tparm.c,v 1.3 2011/03/10 09:45:32 roy Exp $");
+__RCSID("$NetBSD: tparm.c,v 1.4 2011/03/10 10:46:33 roy Exp $");
 
 #include <assert.h>
 #include <ctype.h>
@@ -338,14 +338,12 @@
                case 'P':
                        if (pop(&val, NULL, &stack))
                                return NULL;
-                       str++;
                        if (*str >= 'a' && *str <= 'z')
                                dnums[*str - 'a'] = val;
                        else if (*str >= 'A' && *str <= 'Z')
                                term->_snums[*str - 'A'] = val;
                        break;
                case 'g':
-                       str++;
                        if (*str >= 'a' && *str <= 'z') {
                                if (push(dnums[*str - 'a'], NULL, &stack))
                                        return NULL;



Home | Main Index | Thread Index | Old Index