From 356d3961f14427901f385b22667604cfdc02b33e Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 14 Sep 2009 02:43:44 +0000 Subject: [PATCH] fixed indexes when printing tables git-svn-id: svn://anubis/anaglym/trunk@8 99a6e188-d820-4881-8870-2d33a10e2619 --- ag.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ag.cc b/ag.cc index 53975af..e5d0c73 100644 --- a/ag.cc +++ b/ag.cc @@ -37,10 +37,10 @@ namespace ag if (!first) cout << ", "; cout << '['; - ag_print_val(L, index + 1); + ag_print_val(L, lua_gettop(L) - 1); cout << ']'; cout << " => "; - ag_print_val(L, index + 2); + ag_print_val(L, lua_gettop(L)); lua_pop(L, 1); }