Skip to content

Commit

Permalink
Minor safety fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmudge committed Jan 12, 2021
1 parent c0facfb commit ed58118
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OctoPrint_MeatPack/meatpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ def initialize_arrays():
global MeatPackLookupTablePackable
global MeatPackLookupTableValue

for i in range (0, 255):
MeatPackLookupTablePackable[i] = MeatPackLookupTableValue[i] = 0

if not ArraysInitialized:
for i in range (0, 255):
MeatPackLookupTablePackable[i] = MeatPackLookupTableValue[i] = 0

for char, value in MeatPackReverseLookupTbl.items():
c = ord(char)
MeatPackLookupTablePackable[c] = 1
MeatPackLookupTableValue[c] = value

ArraysInitialized = True
ArraysInitialized = True


"""
Expand Down

0 comments on commit ed58118

Please sign in to comment.