diff --git a/lib/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp index 3a4a17c58..7b2df29fb 100644 --- a/lib/libimhex/source/api/imhex_api.cpp +++ b/lib/libimhex/source/api/imhex_api.cpp @@ -49,7 +49,9 @@ namespace hex { u32 addHighlight(const Region ®ion, color_t color, const std::string &tooltip) { auto &highlights = impl::getHighlights(); - auto id = highlights.size(); + static u64 id = 0; + + id++; highlights.insert({ id, Highlighting {region, color, tooltip}