summaryrefslogtreecommitdiff
path: root/tools/pxlasm.py
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2004-12-18 09:15:47 +0000
committerHenry Stiles <henry.stiles@artifex.com>2004-12-18 09:15:47 +0000
commit471a19045d00596a4e4da8d4061f2f2c11090474 (patch)
tree9ca4fcaeb91227e0b5b76b2b94c3768ad5c39e98 /tools/pxlasm.py
parent64a429f31a28b220e153d4e78fdca9beee7d1bb8 (diff)
The assembler would fail if the character ']' appeared as data in an
array that was not hex formatted, confusing the array data with "end of array". git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@2158 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'tools/pxlasm.py')
-rwxr-xr-xtools/pxlasm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pxlasm.py b/tools/pxlasm.py
index d8b4082d5..e027f3ac5 100755
--- a/tools/pxlasm.py
+++ b/tools/pxlasm.py
@@ -454,9 +454,9 @@ class pxl_asm:
return 0
def consume_to_char_plus_one(self, chr):
- while (self.data[self.index] != chr):
+ while (self.data[self.index:self.index+len(chr)] != chr):
self.index = self.index + 1
- self.index = self.index + 1
+ self.index = self.index + len(chr)
def Tag_ubyte_array(self):
if ( self.getTag( 'ubyte_array' ) ):
@@ -719,7 +719,7 @@ class pxl_asm:
else:
n = self.next_num()
self.pack(self.pack_string, n)
- self.consume_to_char_plus_one(']')
+ self.consume_to_char_plus_one('\n]')
return 1
return 0