Skip to content

Commit

Permalink
Fix error message not to be reported for empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed May 27, 2023
1 parent 5aa4558 commit 02a3b5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opshin/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def visit_Module(self, node: TypedModule) -> plt.AST:
return cp

def visit_Constant(self, node: TypedConstant) -> plt.AST:
if isinstance(node.value, bytes):
if isinstance(node.value, bytes) and node.value != b"":
try:
bytes.fromhex(node.value.decode())
except ValueError:
Expand Down

0 comments on commit 02a3b5c

Please sign in to comment.