summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-11-20 14:52:02 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-11-20 14:52:39 -0500
commitb688229d04b08420087ae79612a88bd89b8b665c (patch)
tree3297d2691910dfcd9d9739b5d99652814f9caff8
parent289a15a2d78f4c8af9c52ed5141731cc52ef39fb (diff)
downloadsystemtap-steved-b688229d04b08420087ae79612a88bd89b8b665c.tar.gz
systemtap-steved-b688229d04b08420087ae79612a88bd89b8b665c.tar.xz
systemtap-steved-b688229d04b08420087ae79612a88bd89b8b665c.zip
fix --vp NNN logic for #chars < 5
-rw-r--r--ChangeLog4
-rw-r--r--main.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0cd00d92..d248018c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-20 Frank Ch. Eigler <fche@elastic.org>
+
+ * main.cxx (main): Correct thinko in --vp option with <5 arg chars.
+
2008-11-18 Jim Keniston <jkenisto@us.ibm.com>
PR 6879
diff --git a/main.cxx b/main.cxx
index 93848dec..406228ae 100644
--- a/main.cxx
+++ b/main.cxx
@@ -654,7 +654,7 @@ main (int argc, char * const argv [])
if (strlen(optarg) < 1 || strlen(optarg) > 5)
ok = false;
if (ok)
- for (unsigned i=0; i<5; i++)
+ for (unsigned i=0; i<strlen(optarg); i++)
if (isdigit (optarg[i]))
s.perpass_verbose[i] += optarg[i]-'0';
else