We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2c1462 commit 925a8d4Copy full SHA for 925a8d4
1 file changed
ws4py/utf8validator.py
@@ -104,6 +104,7 @@ def validate(self, ba):
104
"""
105
state = self.state
106
DFA = Utf8Validator.UTF8VALIDATOR_DFA
107
+ i = 0 # make sure 'i' is set if when 'ba' is empty
108
for i, b in enumerate(ba):
109
## optimized version of decode(), since we are not interested in actual code points
110
state = DFA[256 + (state << 4) + DFA[b]]
0 commit comments