From f52bbd89be80cfecc6eebeb05b3817c2b0bc49e5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 25 Jan 2014 14:47:38 +0100 Subject: [PATCH] Fix bug in case OP_INITPROP_N where we used the value as the key. --- jsrun.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jsrun.c b/jsrun.c index cca928a..239e543 100644 --- a/jsrun.c +++ b/jsrun.c @@ -773,11 +773,10 @@ static void jsR_run(js_State *J, js_Function *F) break; case OP_INITPROP_N: - js_pushnumber(J, *pc++); - str = js_tostring(J, -2); - obj = js_toobject(J, -3); + str = jsV_numbertostring(J, *pc++); + obj = js_toobject(J, -2); jsR_setproperty(J, obj, str, -1); - js_pop(J, 2); + js_pop(J, 1); break; case OP_GETPROP: