[svn:parrot] r45726 - trunk/src
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Fri Apr 16 22:42:04 UTC 2010
Author: plobsing
Date: Fri Apr 16 22:42:03 2010
New Revision: 45726
URL: https://trac.parrot.org/parrot/changeset/45726
Log:
fix "--hash-seed 12345678"
check for null *before* incrementing pointer
Modified:
trunk/src/main.c
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c Fri Apr 16 21:41:33 2010 (r45725)
+++ trunk/src/main.c Fri Apr 16 22:42:03 2010 (r45726)
@@ -398,11 +398,11 @@
}
else if (!strncmp(arg, "--hash-seed", 11)) {
- arg = strrchr(arg, '=')+1;
- if (!arg) {
- ++pos;
- arg = argv[pos];
- }
+ if ((arg = strrchr(arg, '=')))
+ arg++;
+ else
+ arg = argv[++pos];
+
if (is_all_hex_digits(arg)) {
interp->hash_seed = strtoul(arg, NULL, 16);
}
More information about the parrot-commits
mailing list