diff options
Diffstat (limited to 'src/intercopycontext.cpp')
-rw-r--r-- | src/intercopycontext.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp index 978a69b..8058838 100644 --- a/src/intercopycontext.cpp +++ b/src/intercopycontext.cpp | |||
@@ -731,7 +731,7 @@ void InterCopyContext::inter_copy_keyvaluepair() const | |||
731 | STACK_CHECK_START_REL(L2, 0); | 731 | STACK_CHECK_START_REL(L2, 0); |
732 | 732 | ||
733 | // extract all uservalues of the source. unfortunately, the only way to know their count is to iterate until we fail | 733 | // extract all uservalues of the source. unfortunately, the only way to know their count is to iterate until we fail |
734 | int _nuv = 0; | 734 | int _nuv{ 0 }; |
735 | while (lua_getiuservalue(L1, L1_i, _nuv + 1) != LUA_TNONE) { // L1: ... u [uv]* nil | 735 | while (lua_getiuservalue(L1, L1_i, _nuv + 1) != LUA_TNONE) { // L1: ... u [uv]* nil |
736 | ++_nuv; | 736 | ++_nuv; |
737 | } | 737 | } |
@@ -739,11 +739,8 @@ void InterCopyContext::inter_copy_keyvaluepair() const | |||
739 | lua_pop(L1, 1); // L1: ... u [uv]* | 739 | lua_pop(L1, 1); // L1: ... u [uv]* |
740 | STACK_CHECK(L1, _nuv); | 740 | STACK_CHECK(L1, _nuv); |
741 | 741 | ||
742 | DeepPrelude* const u{ *lua_tofulluserdata<DeepPrelude*>(L1, L1_i) }; | 742 | DeepPrelude* const _u{ *lua_tofulluserdata<DeepPrelude*>(L1, L1_i) }; |
743 | std::string_view const errmsg{ DeepFactory::PushDeepProxy(L2, u, _nuv, mode) }; // L1: ... u [uv]* L2: u | 743 | DeepFactory::PushDeepProxy(L2, _u, _nuv, mode, getErrL()); // L1: ... u [uv]* L2: u |
744 | if (!errmsg.empty()) { | ||
745 | raise_luaL_error(getErrL(), errmsg.data()); | ||
746 | } | ||
747 | 744 | ||
748 | // transfer all uservalues of the source in the destination | 745 | // transfer all uservalues of the source in the destination |
749 | { | 746 | { |