Minor tweak

This commit is contained in:
Miroslav Stampar
2016-09-22 10:22:48 +02:00
parent 9902018cab
commit e10bb42597
3 changed files with 5 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
length = None
showEta = conf.eta and isinstance(length, int)
numThreads = min(conf.threads, length)
numThreads = min(conf.threads, length) or 1
if showEta:
progress = ProgressBar(maxValue=length)
@@ -279,7 +279,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
finally:
firstCheck = True
elif not lastCheck:
elif not lastCheck and numThreads == 1: # not usable in multi-threading environment
if charTbl[(len(charTbl) >> 1)] < ord(' '):
try:
# favorize last char check if current value inclines toward 0