From c84886e12ca62821541f855e0d115d5e6c055be4 Mon Sep 17 00:00:00 2001 From: crc Date: Mon, 4 Jan 2021 19:40:23 +0000 Subject: [PATCH] python toolchain: minor correction to retro-extend.py (#34) FossilOrigin-Name: 2bc1dd429ef5a38068b3144a3b99c02c120fde2ed2fff2afefa839c949b28fee --- tools/retro-extend.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/retro-extend.py b/tools/retro-extend.py index 15f7e2a..0ed2dd3 100755 --- a/tools/retro-extend.py +++ b/tools/retro-extend.py @@ -5,7 +5,7 @@ # into the image. After completion the image file will be updated with # the changes. # -# Copyright (c) 2010 - 2020, Charles Childers +# Copyright (c) 2010 - 2021, Charles Childers # Optimizations and process() rewrite by Greg Copeland # # Usage: @@ -403,8 +403,8 @@ def load_image(): def process(line): for Token in line.split(): - injectString(Token, 1024) - stack.append(1024) + injectString(Token, 1025) + stack.append(1025) execute(Interpreter) @@ -424,8 +424,8 @@ def save_image(): print("Writing {0} cells to {1}".format(memory[3], sys.argv[1])) with open(sys.argv[1], "wb") as file: j = 0 - while j < memory[3]: - file.write(struct.pack("i", memory[j])) + while j <= memory[3]: + file.write(struct.pack("