forked from LBRYCommunity/lbry-sdk
OP_0 can be an OP but also an empty string, figure this out contextually in parser
This commit is contained in:
parent
61a254f580
commit
80b65ae7e7
1 changed files with 2 additions and 0 deletions
|
@ -158,6 +158,8 @@ class Parser:
|
|||
while self.token_index < len(self.tokens) and self.opcode_index < len(self.opcodes):
|
||||
token = self.tokens[self.token_index]
|
||||
opcode = self.opcodes[self.opcode_index]
|
||||
if token.value == 0 and isinstance(opcode, PUSH_SINGLE):
|
||||
token = DataToken(b'')
|
||||
if isinstance(token, DataToken):
|
||||
if isinstance(opcode, (PUSH_SINGLE, PUSH_INTEGER, PUSH_SUBSCRIPT)):
|
||||
self.push_single(opcode, token.value)
|
||||
|
|
Loading…
Reference in a new issue