From a8d177f23140039b4654d920d217995b42e5932c Mon Sep 17 00:00:00 2001 From: Alexandre Possebom Date: Mon, 22 Sep 2014 20:16:11 -0300 Subject: [PATCH] Fixed a small bug --- setup.py | 2 +- twik/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d00233b..6070963 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '0.1' +version = '0.2' setup(name='twik', version=version, diff --git a/twik/__init__.py b/twik/__init__.py index dd784cd..ae893fd 100644 --- a/twik/__init__.py +++ b/twik/__init__.py @@ -71,7 +71,7 @@ def injectcharacter(input, offset, reserved, seed, length, cStart, cNum): for i in range(0, length - reserved): i2 = (pos0 + reserved + i) % length c = ord(input[i2]) - if c >= cStart or c < ord(cStart) + cNum: + if c >= ord(cStart) and c < ord(cStart) + cNum: return input head = input[:pos] if pos > 0 else "" inject = ((seed + ord(input[pos])) % cNum) + ord(cStart)