From 6b6a2ed0579d3f305bb4c3de944984f3262c075e Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Fri, 8 Jan 2021 04:28:53 +0900 Subject: [PATCH] fixed a bug --- bootstrap.fs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap.fs b/bootstrap.fs index c35662a..47840de 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -1159,7 +1159,7 @@ decimal \ set default to decimal ; \ 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 \ Will define the error message corresponds to this error later @@ -1185,8 +1185,9 @@ char 0 char B - constant STRING-OVERFLOW-ERROR \ -18 else s-buffer dup \ save start address begin key dup '"' <> while - 2dup swap - s-buffer-size >= if - throw STRING-OVERFLOW-ERROR + ( buf pos c pos-buf ) + over 3 pick - s-buffer-size 1- >= if + STRING-OVERFLOW-ERROR throw then over c! \ store char 1+ \ increment address