1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 17:02:37 +01:00

Fix #14932: Increase internal badge index size to avoid overflowing BadgeIDs. (#14933)

This commit is contained in:
Peter Nelson
2025-12-19 18:13:59 +00:00
committed by GitHub
parent 598d8fd65c
commit 39f30692fe

View File

@@ -13,8 +13,8 @@
#include "core/enum_type.hpp"
#include "core/strong_typedef_type.hpp"
using BadgeID = StrongType::Typedef<uint16_t, struct BadgeIDTag, StrongType::Compare>;
using BadgeClassID = StrongType::Typedef<uint16_t, struct BadgeClassIDTag, StrongType::Compare>;
using BadgeID = StrongType::Typedef<uint32_t, struct BadgeIDTag, StrongType::Compare>;
using BadgeClassID = StrongType::Typedef<uint32_t, struct BadgeClassIDTag, StrongType::Compare>;
template <> struct std::hash<BadgeClassID> {
std::size_t operator()(const BadgeClassID &badge_class_index) const noexcept