aboutsummaryrefslogtreecommitdiff
path: root/src/deep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/deep.cpp')
-rw-r--r--src/deep.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/deep.cpp b/src/deep.cpp
index 780c86e..3b0e015 100644
--- a/src/deep.cpp
+++ b/src/deep.cpp
@@ -223,13 +223,13 @@ char const* DeepFactory::PushDeepProxy(Dest L, DeepPrelude* prelude, int nuv_, L
223 223
224 if( lua_isnil( L, -1)) // // No metatable yet. 224 if( lua_isnil( L, -1)) // // No metatable yet.
225 { 225 {
226 int oldtop = lua_gettop( L); // DPC proxy nil 226 lua_pop(L, 1); // DPC proxy
227 lua_pop( L, 1); // DPC proxy 227 int const oldtop{ lua_gettop(L) };
228 // 1 - make one and register it 228 // 1 - make one and register it
229 if (mode_ != LookupMode::ToKeeper) 229 if (mode_ != LookupMode::ToKeeper)
230 { 230 {
231 factory.createMetatable(L); // DPC proxy metatable 231 factory.createMetatable(L); // DPC proxy metatable
232 if (lua_gettop(L) - oldtop != 0 || !lua_istable(L, -1)) 232 if (lua_gettop(L) - oldtop != 1 || !lua_istable(L, -1))
233 { 233 {
234 // factory didn't push exactly 1 value, or the value it pushed is not a table: ERROR! 234 // factory didn't push exactly 1 value, or the value it pushed is not a table: ERROR!
235 lua_settop( L, oldtop); // DPC proxy X 235 lua_settop( L, oldtop); // DPC proxy X