From: Phil Burk Date: Sun, 27 Dec 2015 07:31:41 +0000 (-0800) Subject: Fix $ROM X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/80f146fcbe6aa635393e0ad63e661f9cd0f90d17 Fix $ROM Was using DO instead of ?DO so it failed on index 0. --- diff --git a/fth/strings.fth b/fth/strings.fth index 8bead25..dc998ad 100644 --- a/fth/strings.fth +++ b/fth/strings.fth @@ -19,7 +19,7 @@ ANEW TASK-STRINGS.FTH \ Structure of string table : $ARRAY ( ) - CREATE ( #strings #chars_max -- ) + CREATE ( #strings #chars_max -- ) dup , 2+ * even-up allot DOES> ( index -- $addr ) @@ -42,7 +42,7 @@ ANEW TASK-STRINGS.FTH : TEXT= ( addr1 addr2 count -- flag ) >r -1 -rot r> 0 - DO dup c@ tolower + ?DO dup c@ tolower 2 pick c@ tolower - IF rot drop 0 -rot LEAVE THEN @@ -80,7 +80,7 @@ ANEW TASK-STRINGS.FTH : ($ROM) ( index address -- $string ) ( -- index address ) swap 0 - DO dup c@ 1+ + aligned + ?DO dup c@ 1+ + aligned LOOP ;