Fix make_dafsa.py to generate 4 bit return values

This commit is contained in:
Tim Rühsen 2016-01-01 22:32:11 +01:00
parent 23345f5f37
commit 1604cb3dca
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ def to_dafsa(words):
if not 0x1F < ord(word[0]) < 0x80:
raise InputError('Domain names must be printable 7-bit ASCII')
if len(word) == 1:
return chr(ord(word[0]) & 0x0F), [None]
return chr(int(word[0], 16) & 0x0F), [None]
return word[0], [to_nodes(word[1:])]
return [to_nodes(word) for word in words]