aboutsummaryrefslogtreecommitdiff
path: root/src/linda.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-10 10:59:08 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-10 10:59:08 +0200
commite7fa2439c8f328ab146037628bce30894e36a32c (patch)
tree12676776098fc8a737d4917251391d0c37cef906 /src/linda.cpp
parent40d6d3f59de802c6e2187540eb654248a5affc30 (diff)
downloadlanes-e7fa2439c8f328ab146037628bce30894e36a32c.tar.gz
lanes-e7fa2439c8f328ab146037628bce30894e36a32c.tar.bz2
lanes-e7fa2439c8f328ab146037628bce30894e36a32c.zip
Unify the value returned by linda:deep() and the string conversion of an unnamed Linda
Diffstat (limited to 'src/linda.cpp')
-rw-r--r--src/linda.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linda.cpp b/src/linda.cpp
index 81926f9..4dc2162 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -87,7 +87,7 @@ template <bool OPT>
87 std::ignore = luaG_pushstring(L_, _lindaName); 87 std::ignore = luaG_pushstring(L_, _lindaName);
88 } else { 88 } else {
89 // obfuscate the pointer so that we can't read the value with our eyes out of a script 89 // obfuscate the pointer so that we can't read the value with our eyes out of a script
90 std::ignore = luaG_pushstring(L_, "%p", std::bit_cast<uintptr_t>(_linda) ^ kConfigRegKey.storage); 90 std::ignore = luaG_pushstring(L_, "%p", _linda->obfuscated());
91 } 91 }
92 lua_concat(L_, 2); 92 lua_concat(L_, 2);
93 return 1; 93 return 1;
@@ -344,7 +344,7 @@ LUAG_FUNC(linda_count)
344LUAG_FUNC(linda_deep) 344LUAG_FUNC(linda_deep)
345{ 345{
346 Linda* const _linda{ ToLinda<false>(L_, 1) }; 346 Linda* const _linda{ ToLinda<false>(L_, 1) };
347 lua_pushlightuserdata(L_, _linda); // just the address 347 lua_pushlightuserdata(L_, _linda->obfuscated<void*>()); // just the address
348 return 1; 348 return 1;
349} 349}
350 350