aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-10-30 10:02:27 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-10-30 10:02:27 +0100
commitdfb4a035c2d80a6be689e14ca495b8ba032f58c4 (patch)
tree2686a6f2e8ecefc912e44089e22167d2a7428c28 /src
parent9c768185696879c6642c1f26c86884eaf727fe27 (diff)
downloadlanes-dfb4a035c2d80a6be689e14ca495b8ba032f58c4.tar.gz
lanes-dfb4a035c2d80a6be689e14ca495b8ba032f58c4.tar.bz2
lanes-dfb4a035c2d80a6be689e14ca495b8ba032f58c4.zip
Test full userdata keys with verbose_errors
Diffstat (limited to 'src')
-rw-r--r--src/intercopycontext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp
index 0ccd619..4be1883 100644
--- a/src/intercopycontext.cpp
+++ b/src/intercopycontext.cpp
@@ -494,8 +494,12 @@ void InterCopyContext::interCopyKeyValuePair() const
494 *std::format_to(_valPath, "{}[U:{}]", name, _key) = 0; 494 *std::format_to(_valPath, "{}[U:{}]", name, _key) = 0;
495 } else if (luaW_type(L1, _key_i) == LuaType::BOOLEAN) { 495 } else if (luaW_type(L1, _key_i) == LuaType::BOOLEAN) {
496 int const _key{ lua_toboolean(L1, _key_i) }; 496 int const _key{ lua_toboolean(L1, _key_i) };
497 _valPath = static_cast<char*>(alloca(name.size() + 8)); // +8 for [], 'false' and terminating 0 497 _valPath = static_cast<char*>(alloca(name.size() + 8)); // +8 for [false] and terminating 0
498 *std::format_to(_valPath, "{}[{}]", name, _key ? "true" : "false") = 0; 498 *std::format_to(_valPath, "{}[{}]", name, _key ? "true" : "false") = 0;
499 } else if (luaW_type(L1, _key_i) == LuaType::USERDATA) {
500 // I don't want to invoke tostring on the userdata to get its name
501 _valPath = static_cast<char*>(alloca(name.size() + 11)); // +11 for [U:<FULL>] and terminating 0
502 *std::format_to(_valPath, "{}[U:<FULL>]", name) = 0;
499 } 503 }
500 } 504 }
501 505