diff --git a/src/items/Inventories.cpp b/src/items/Inventories.cpp index d3af607d8..4d2baa36d 100644 --- a/src/items/Inventories.cpp +++ b/src/items/Inventories.cpp @@ -20,7 +20,9 @@ std::shared_ptr Inventories::create(size_t size) { std::shared_ptr Inventories::createVirtual(size_t size) { int64_t id; do { - id = -std::max(1LL, std::llabs(random.rand64())); + // lua does not support long integers because Number is floating-point + // type. Changing int_consumer to use 64 bit integer does not change anything + id = -std::max(1LL, std::llabs(random.rand64() % 1000'000'000)); } while (map.find(id) != map.end()); auto inv = std::make_shared(id, size);