From 1dc893efcd664df86606b571d4b6bbee5b5868ca Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 15:53:14 +1000 Subject: Need to copy to the stack if not coming from a stack --- src/ldo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ldo.js') diff --git a/src/ldo.js b/src/ldo.js index 004c659..7c1f474 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -233,7 +233,7 @@ const tryfuncTM = function(L, off, func) { for (let p = L.top; p > off; p--) L.stack[p] = L.stack[p-1]; L.top++; /* slot ensured by caller */ - L.stack[off] = tm; /* tag method is the new function to be called */ + L.stack[off] = new lobject.TValue(tm.type, tm.value); /* tag method is the new function to be called */ }; /* -- cgit v1.2.3-54-g00ecf