From 6c696f7c553c2439e37b2a75bf968c91c9eeb1b5 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Mon, 8 Apr 2024 17:27:19 -0400 Subject: [PATCH] bug fix for ZAM code generation --- src/script_opt/ZAM/Compile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script_opt/ZAM/Compile.h b/src/script_opt/ZAM/Compile.h index c08873729f..ba9fd8f08f 100644 --- a/src/script_opt/ZAM/Compile.h +++ b/src/script_opt/ZAM/Compile.h @@ -362,7 +362,7 @@ private: int FrameSlot(const ID* id); int FrameSlotIfName(const Expr* e) { auto n = e->Tag() == EXPR_NAME ? e->AsNameExpr() : nullptr; - return n ? FrameSlot(n->Id()) : 0; + return n ? FrameSlot(n->Id()) : -1; } int FrameSlot(const NameExpr* id) { return FrameSlot(id->AsNameExpr()->Id()); }