Skip to content
Snippets Groups Projects
Commit 39eef270 authored by Dave Hylands's avatar Dave Hylands Committed by Damien George
Browse files

tools/mpy-tool.py: Fix build error when no qstrs present in frozen mpy.

If you happen to only have a really simple frozen file that doesn't contain
any new qstrs then the generated frozen_mpy.c file contains an empty
enumeration which causes a C compile time error.
parent 0d165fec
No related branches found
No related tags found
No related merge requests found
......@@ -510,6 +510,7 @@ def freeze_mpy(base_qstrs, raw_codes):
print('#endif')
print()
if len(new) > 0:
print('enum {')
for i in range(len(new)):
if i == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment