From 6b75cd5d73223b1c5f9c6c53365c8039a2879e60 Mon Sep 17 00:00:00 2001 From: Tenshi Date: Sun, 14 Jan 2024 15:28:27 +0100 Subject: [PATCH] fix compilation --- lvtrun/src/Run/Locals.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lvtrun/src/Run/Locals.hs b/lvtrun/src/Run/Locals.hs index b9c367c..9ab8a52 100644 --- a/lvtrun/src/Run/Locals.hs +++ b/lvtrun/src/Run/Locals.hs @@ -74,8 +74,8 @@ initLocalsParams' (values, newStack) prms = initLocalsParams :: [TypeName] -> Stack -> (Locals, Stack) initLocalsParams [] stack = ([], stack) initLocalsParams prms stack - | length params > length stack = throw $ WasmError "initLocalsParam: bad nb" - | otherwise = initLocalsParams' (stackPopN stack (length params)) prms + | length prms > length stack = throw $ WasmError "initLocalsParam: bad nb" + | otherwise = initLocalsParams' (stackPopN stack (length prms)) prms initLocals :: [Local] -> [TypeName] -> Stack -> (Locals, Stack) initLocals localVarTypes paramTypes stack = do