diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 3af8fa885..72d9cee1a 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -277,7 +277,7 @@ namespace SohImGui { void LoadResource(const std::string& name, const std::string& path, const ImVec4& tint) { GfxRenderingAPI* api = gfx_get_current_rendering_api(); - const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(path)).get()); + const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(path).get()); std::vector texBuffer; texBuffer.reserve(res->width * res->height * 4); diff --git a/libultraship/libultraship/TextureMod.cpp b/libultraship/libultraship/TextureMod.cpp index 7caf6b6f6..b44987a62 100644 --- a/libultraship/libultraship/TextureMod.cpp +++ b/libultraship/libultraship/TextureMod.cpp @@ -43,7 +43,7 @@ namespace Ship { if (raw_path == nullptr) return; const auto api = BIND_PTR("gfx_api", GfxRenderingAPI*); - const auto path = raw_path + ".png"; + const auto path = std::string(raw_path) + ".png"; const auto node = BIND_PTR("node", TextureCacheNode**); const auto fmt = BIND_VAR("fmt", uint32_t*); const auto siz = BIND_VAR("siz", uint32_t*);