Module Name: src
Committed By: roy
Date: Thu Mar 10 10:46:34 UTC 2011
Modified Files:
src/lib/libterminfo: tparm.c
Log Message:
Fix two other off-by-one errors when processing %P and %g commands.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/tparm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libterminfo/tparm.c
diff -u src/lib/libterminfo/tparm.c:1.3 src/lib/libterminfo/tparm.c:1.4
--- src/lib/libterminfo/tparm.c:1.3 Thu Mar 10 09:45:32 2011
+++ src/lib/libterminfo/tparm.c Thu Mar 10 10:46:33 2011
@@ -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;