atoi() doesn't cut the mustard if the PERL_HASH_SEED
Jarkko Hietaniemi [Fri, 27 Jun 2003 08:40:45 +0000 (08:40 +0000)]
is larger than INT_MAX (atoi() returns -1 in that case).

p4raw-id: //depot/perl@19865

perl.c

diff --git a/perl.c b/perl.c
index badb216..d0bf931 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -284,7 +284,7 @@ perl_construct(pTHXx)
        if (s)
            while (isSPACE(*s)) s++;
        if (s && isDIGIT(*s))
-           PL_hash_seed = (UV)atoi(s);
+           PL_hash_seed = (UV)Atoul(s);
 #ifndef USE_HASH_SEED_EXPLICIT
        else {
            /* Compute a random seed */