Skip to content

Commit b5240b2

Browse files
committed
fix a stupid bug with entitiesWindows1252 thanks to testcases from Thomas Broyer
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40368
1 parent dd50ab6 commit b5240b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def consumeNumberEntity(self, isHex):
132132
# If the integer is between 127 and 160 (so 128 and bigger and 159 and
133133
# smaller) we need to do the "windows trick".
134134
if 127 < charAsInt < 160:
135-
charAsInt = entitiesWindows1252[128 - charAsInt]
135+
charAsInt = entitiesWindows1252[charAsInt - 128]
136136

137137
# 0 is not a good number.
138138
if charAsInt == 0:

0 commit comments

Comments
 (0)