diff --git a/pysollib/init.py b/pysollib/init.py index 518326b2..8fe362dd 100644 --- a/pysollib/init.py +++ b/pysollib/init.py @@ -157,10 +157,12 @@ def init(): try: kw = {'shell': True, 'stdout': subprocess.PIPE, - 'stderr': subprocess.PIPE} + 'stderr': subprocess.PIPE, + 'stdin': subprocess.PIPE,} if os.name != 'nt': kw['close_fds'] = True p = subprocess.Popen(settings.FCS_COMMAND+' --help', **kw) + p.stdin.close() if p.stdout.readline().startswith('fc-solve'): settings.USE_FREECELL_SOLVER = True if os.name == 'posix': diff --git a/pysollib/pysolrandom.py b/pysollib/pysolrandom.py index e6fbb004..d010da47 100644 --- a/pysollib/pysolrandom.py +++ b/pysollib/pysolrandom.py @@ -221,7 +221,7 @@ def constructRandom(s): if not s: return None seed = long(s) - if 0 <= seed <= 32000: + if 0 <= seed < (1<<31): return LCRandom31(seed) return PysolRandom(seed)