From 014b2c6f09e89d5dfe119e470040168e286695f6 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 18 Nov 2015 12:52:56 +0100 Subject: [PATCH] Bugfix in hex8tohex32.py --- scripts/cxxdemo/hex8tohex32.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/cxxdemo/hex8tohex32.py b/scripts/cxxdemo/hex8tohex32.py index 3fa80b1..ae44101 100644 --- a/scripts/cxxdemo/hex8tohex32.py +++ b/scripts/cxxdemo/hex8tohex32.py @@ -25,9 +25,8 @@ for line in fileinput.input(): data.append(0) ptr -= 1 else: - while ptr < addr: + while ptr + len(data) < addr: data.append(0) - ptr += 1 else: data += [int(tok, 16) for tok in line.split()]