shithub: libmujs

Download patch

ref: db110ea88edde20cfdd76a7162de751fefcc1fde
parent: 76e400fb67a966ecebd172f6e14a348ce21bea1f
author: Tor Andersson <tor.andersson@artifex.com>
date: Wed Mar 16 07:34:18 EDT 2022

Bug 705052: Don't use private STACK/TOP macros in jsstate.c

These convenience macros are defined and used in jsrun.c, and should not
be used in other files.

--- a/jsstate.c
+++ b/jsstate.c
@@ -10,9 +10,9 @@
 
 static int js_ptry(js_State *J) {
 	if (J->trytop == JS_TRYLIMIT) {
-		STACK[TOP].type = JS_TLITSTR;
-		STACK[TOP].u.litstr = "exception stack overflow";
-		++TOP;
+		J->stack[J->top].type = JS_TLITSTR;
+		J->stack[J->top].u.litstr = "exception stack overflow";
+		++J->top;
 		return 1;
 	}
 	return 0;