Module Name:    src
Committed By:   roy
Date:           Thu Mar 10 09:45:32 UTC 2011

Modified Files:
        src/lib/libterminfo: tparm.c

Log Message:
Fix an off-by-one error when processing embedded values.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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.2 src/lib/libterminfo/tparm.c:1.3
--- src/lib/libterminfo/tparm.c:1.2	Wed Sep 22 06:10:51 2010
+++ src/lib/libterminfo/tparm.c	Thu Mar 10 09:45:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $ */
+/* $NetBSD: tparm.c,v 1.3 2011/03/10 09:45:32 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $");
+__RCSID("$NetBSD: tparm.c,v 1.3 2011/03/10 09:45:32 roy Exp $");
 
 #include <assert.h>
 #include <ctype.h>
@@ -371,7 +371,7 @@
 			break;
 		case '{':
 			val = 0;
-			for (str++; isdigit((unsigned char)*str);  str++)
+			for (; isdigit((unsigned char)*str);  str++)
 				val = (val * 10) + (*str - '0');
 			if (push(val, NULL, &stack))
 				return NULL;

Reply via email to