From efc7d619006c2fda52c491aee68e24c12b85fd14 Mon Sep 17 00:00:00 2001 From: ketmar Date: Fri, 20 Oct 2023 04:58:41 +0000 Subject: [PATCH] UrForth: fixed small bug in struct "TO" handler FossilOrigin-Name: 84e79b62c4ca278adae92c0da6517f0bb67da364bc228aca554f2cdfd2c3952b --- urflibs/init/bootstrap/50-defer_value.f | 9 +++++---- urflibs/init/struct.f | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/urflibs/init/bootstrap/50-defer_value.f b/urflibs/init/bootstrap/50-defer_value.f index 3767d01..a970112 100644 --- a/urflibs/init/bootstrap/50-defer_value.f +++ b/urflibs/init/bootstrap/50-defer_value.f @@ -27,10 +27,11 @@ ALIAS FORTH:(TO-DEFER) (TO-VALUE) : TO ( n -- ) PARSE-SKIP-COMMENTS PARSE-NAME DUP " word name expected" ?NOT-ERROR - FALSE (TO-EXTENDER) IFNOT - 2DUP FIND-WORD IFNOT - ;; not found - ENDCR SPACE TYPE " ? -- wut?\n" TYPE " word not found" ERROR + FALSE (TO-EXTENDER) + IFNOT + 2DUP FIND-WORD ( addr count cfa TRUE / addr count FALSE ) + IFNOT ;; not found + ENDCR SPACE TYPE ." ? -- wut?\n" " word not found" ERROR ENDIF NROT 2DROP DUP VALUE? IF STATE @ IF ( cfa ) diff --git a/urflibs/init/struct.f b/urflibs/init/struct.f index 95abef8..91867b2 100644 --- a/urflibs/init/struct.f +++ b/urflibs/init/struct.f @@ -207,6 +207,7 @@ ALSO STRUCT-INTERNALS DEFINITIONS TRUE ;; we're done here ELSE DROP FALSE ENDIF + ELSE FALSE ENDIF ENDIF ;.. -- 2.11.4.GIT