mirror of https://github.com/arendst/Tasmota.git
Merge pull request #8487 from s-hadinger/unishox_py_fix
Fix unishox python
This commit is contained in:
commit
d3f1677c08
|
@ -47,10 +47,10 @@ class Unishox:
|
|||
SHX_SET1B = 2
|
||||
SHX_SET2 = 3
|
||||
|
||||
sets = [[0, ' ', 'e', 0, 't', 'a', 'o', 'i', 'n', 's', 'r'],
|
||||
[0, 'l', 'c', 'd', 'h', 'u', 'p', 'm', 'b', 'g', 'w'],
|
||||
['f', 'y', 'v', 'k', 'q', 'j', 'x', 'z', 0, 0, 0],
|
||||
[0, '9', '0', '1', '2', '3', '4', '5', '6', '7', '8'],
|
||||
sets = [['\0', ' ', 'e', '\0', 't', 'a', 'o', 'i', 'n', 's', 'r'],
|
||||
['\0', 'l', 'c', 'd', 'h', 'u', 'p', 'm', 'b', 'g', 'w'],
|
||||
['f', 'y', 'v', 'k', 'q', 'j', 'x', 'z', '\0', '\0', '\0'],
|
||||
['\0', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8'],
|
||||
['.', ',', '-', '/', '?', '+', ' ', '(', ')', '$', '@'],
|
||||
[';', '#', ':', '<', '^', '*', '"', '{', '}', '[', ']'],
|
||||
['=', '%', '\'', '>', '&', '_', '!', '\\', '|', '~', '`']]
|
||||
|
@ -319,6 +319,8 @@ class Unishox:
|
|||
code = 0
|
||||
count = 0
|
||||
while count < 5:
|
||||
if bit_no_p >= len_:
|
||||
return -1, bit_no_p
|
||||
# detect marker
|
||||
if self.ESCAPE_MARKER == inn[bit_no_p >> 3]:
|
||||
bit_no_p += 8 # skip marker
|
||||
|
|
Loading…
Reference in New Issue