diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-26 17:40:37 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-26 17:40:37 +0100 |
commit | 2eeb245b98bd702379aa92d888f7b7d21d1193b8 (patch) | |
tree | c61a4bee6bec9b7b3c88b8e422e32d710da09ac8 /src/tools.cpp | |
parent | be2f2b4314799d38901c9e80dd35dee63f541c90 (diff) | |
download | lanes-2eeb245b98bd702379aa92d888f7b7d21d1193b8.tar.gz lanes-2eeb245b98bd702379aa92d888f7b7d21d1193b8.tar.bz2 lanes-2eeb245b98bd702379aa92d888f7b7d21d1193b8.zip |
C++ migration: Fix metatable caching bug introduced when converting the index to std::atomic
Diffstat (limited to 'src/tools.cpp')
-rw-r--r-- | src/tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools.cpp b/src/tools.cpp index 89e5499..52c70bc 100644 --- a/src/tools.cpp +++ b/src/tools.cpp | |||
@@ -632,7 +632,7 @@ static lua_Integer get_mt_id( Universe* U, lua_State* L, int i) | |||
632 | 632 | ||
633 | if( id == 0) | 633 | if( id == 0) |
634 | { | 634 | { |
635 | id = U->last_mt_id.fetch_add(1, std::memory_order_relaxed); | 635 | id = U->next_mt_id.fetch_add(1, std::memory_order_relaxed); |
636 | 636 | ||
637 | /* Create two-way references: id_uint <-> table | 637 | /* Create two-way references: id_uint <-> table |
638 | */ | 638 | */ |