mirror of
https://github.com/nineties/planckforth
synced 2024-12-27 21:58:35 +01:00
fixed a bug
This commit is contained in:
parent
9608f4f540
commit
6b6a2ed057
1 changed files with 4 additions and 3 deletions
|
@ -1159,7 +1159,7 @@ decimal \ set default to decimal
|
||||||
;
|
;
|
||||||
|
|
||||||
\ Allocate a buffer for string literal
|
\ Allocate a buffer for string literal
|
||||||
bl constant s-buffer-size \ 1024
|
bl bl * constant s-buffer-size \ 1024
|
||||||
create s-buffer s-buffer-size allot drop
|
create s-buffer s-buffer-size allot drop
|
||||||
|
|
||||||
\ Will define the error message corresponds to this error later
|
\ Will define the error message corresponds to this error later
|
||||||
|
@ -1185,8 +1185,9 @@ char 0 char B - constant STRING-OVERFLOW-ERROR \ -18
|
||||||
else
|
else
|
||||||
s-buffer dup \ save start address
|
s-buffer dup \ save start address
|
||||||
begin key dup '"' <> while
|
begin key dup '"' <> while
|
||||||
2dup swap - s-buffer-size >= if
|
( buf pos c pos-buf )
|
||||||
throw STRING-OVERFLOW-ERROR
|
over 3 pick - s-buffer-size 1- >= if
|
||||||
|
STRING-OVERFLOW-ERROR throw
|
||||||
then
|
then
|
||||||
over c! \ store char
|
over c! \ store char
|
||||||
1+ \ increment address
|
1+ \ increment address
|
||||||
|
|
Loading…
Reference in a new issue