From 34590176eb786d3c94b136463db2fa65cb159e6b Mon Sep 17 00:00:00 2001 From: akifoq <75585197+akifoq@users.noreply.github.com> Date: Tue, 5 Apr 2022 01:33:09 +0300 Subject: [PATCH] Fix IF:<{ and IFNOT:<{ empty continuation case The boolean value should be DROPped in the case the continuation is empty. --- crypto/fift/lib/Asm.fif | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/fift/lib/Asm.fif b/crypto/fift/lib/Asm.fif index 76381b85..edd0e24b 100644 --- a/crypto/fift/lib/Asm.fif +++ b/crypto/fift/lib/Asm.fif @@ -694,9 +694,9 @@ x{E30F} @Defop(ref*2) IFREFELSEREF [] execute } : @run-cont-op { triple 1 ' @run-cont-op does create } : @def-cont-op -{ } { PUSHCONT IF } { IFREF } @def-cont-op IF-cont +{ DROP } { PUSHCONT IF } { IFREF } @def-cont-op IF-cont { IFRET } { PUSHCONT IFJMP } { IFJMPREF } @def-cont-op IFJMP-cont -{ } { PUSHCONT IFNOT } { IFNOTREF } @def-cont-op IFNOT-cont +{ DROP } { PUSHCONT IFNOT } { IFNOTREF } @def-cont-op IFNOT-cont { IFNOTRET } { PUSHCONT IFNOTJMP } { IFNOTJMPREF } @def-cont-op IFNOTJMP-cont { dup 2over rot } : 3dup