From 8d6529209ae5b3f693fde16034d6466af50cfa5d Mon Sep 17 00:00:00 2001 From: hemaolong Date: Tue, 22 Oct 2019 19:18:14 +0800 Subject: [PATCH] fix absindex error when top is zero --- lua/frame.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/frame.go b/lua/frame.go index 12065c3..1df7be5 100644 --- a/lua/frame.go +++ b/lua/frame.go @@ -65,7 +65,7 @@ func (fr *Frame) extend(grow int) { // stack top). func (fr *Frame) absindex(index int) int { // zero, positive, or pseudo index - if index > 0 || isPseudoIndex(index) { + if index >= 0 || isPseudoIndex(index) { return index } // negative