mirror of
https://github.com/nineties/planckforth
synced 2025-01-14 08:01:27 +01:00
Fixed a bug
This commit is contained in:
parent
410a5c2ed0
commit
f1b92c39d7
1 changed files with 2 additions and 1 deletions
|
@ -1157,12 +1157,13 @@ char 0 char B - constant STRING-OVERFLOW-ERROR \ -18
|
||||||
state @ if
|
state @ if
|
||||||
compile litstring
|
compile litstring
|
||||||
here 0 , \ save location of length and fill dummy
|
here 0 , \ save location of length and fill dummy
|
||||||
0 \ length of the string
|
0 \ length of the string + 1 (\0)
|
||||||
begin key dup '"' <> while
|
begin key dup '"' <> while
|
||||||
c, \ store character
|
c, \ store character
|
||||||
1+ \ increment length
|
1+ \ increment length
|
||||||
repeat drop
|
repeat drop
|
||||||
0 c, \ store \0
|
0 c, \ store \0
|
||||||
|
1+
|
||||||
swap ! \ back-fill length
|
swap ! \ back-fill length
|
||||||
align
|
align
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue