From 1ff90e16412bc7c76a75a1557a1d053ace123019 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 9 Nov 2016 19:37:30 +0200 Subject: [PATCH] Correct a regex. \d can match more than just [0-9]. --- pysollib/pysolrandom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysollib/pysolrandom.py b/pysollib/pysolrandom.py index 5ed98188..71bef164 100644 --- a/pysollib/pysolrandom.py +++ b/pysollib/pysolrandom.py @@ -248,7 +248,7 @@ PysolRandom = MTRandom # construct Random from seed string def constructRandom(s): - m = re.match(r"ms(\d+)\n?\Z", s); + m = re.match(r"ms([0-9]+)\n?\Z", s); if m: seed = long(m.group(1)) if 0 <= seed <= LCRandom31.MAX_SEED: