summaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-12 01:20:33 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-12 01:20:33 +0100
commit4f318659751519bffd6bdbde4418814ce26b9c69 (patch)
tree9f59b7566d6558bfec4d083d07f48d89affe249c /loader
parenta6574dce753c0957d369817fb4d23b164fd1de13 (diff)
fix use-after-free
Found-with: asan
Diffstat (limited to 'loader')
-rw-r--r--loader/loader-impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/loader/loader-impl.cpp b/loader/loader-impl.cpp
index 55da68df..62fad6de 100644
--- a/loader/loader-impl.cpp
+++ b/loader/loader-impl.cpp
@@ -38,8 +38,8 @@ struct loader_impl final : loader_
Containers::Pointer<Trade::AbstractImporter> tga_importer =
importer_plugins.loadAndInstantiate("TgaImporter");
- std::unordered_map<StringView, std::shared_ptr<struct tile_atlas>> tile_atlas_map;
- std::unordered_map<StringView, std::shared_ptr<struct anim_atlas>> anim_atlas_map;
+ std::unordered_map<String, std::shared_ptr<struct tile_atlas>> tile_atlas_map;
+ std::unordered_map<String, std::shared_ptr<struct anim_atlas>> anim_atlas_map;
std::vector<String> anim_atlases;
StringView shader(StringView filename) override;