diff --git a/deps/ox/src/ox/std/string.hpp b/deps/ox/src/ox/std/string.hpp index baf8f2d..25293bc 100644 --- a/deps/ox/src/ox/std/string.hpp +++ b/deps/ox/src/ox/std/string.hpp @@ -392,7 +392,7 @@ template constexpr BasicString BasicString::operator+(const char *str) const noexcept { const std::size_t strLen = ox::strlen(str); const auto currentLen = len(); - BasicString cpy(currentLen + strLen); + BasicString cpy; cpy.m_buff.resize(m_buff.size() + strLen); ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen); ox::listcpy(&cpy.m_buff[currentLen], str, strLen); @@ -423,7 +423,7 @@ constexpr BasicString BasicString::operato const std::size_t strLen = src.len(); const auto currentLen = len(); BasicString cpy(currentLen + strLen); - cpy.m_buff.resize(m_buff.size() + strLen + 1); + cpy.m_buff.resize(m_buff.size() + strLen); ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen); ox::listcpy(&cpy.m_buff[currentLen], src.data(), strLen); cpy.m_buff[cpy.m_buff.size() - 1] = 0; diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp index 5211211..8cc7c9a 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp @@ -445,7 +445,7 @@ void TileSheetEditorImGui::drawPaletteMenu() noexcept { } if (ig::DragDropTarget const dragDropTarget; dragDropTarget) { auto const [ref, err] = ig::getDragDropPayload("FileRef"); - if (!err) { + if (!err && endsWith(ref.path, FileExt_npal)) { auto const oldVal = m_selectedPaletteIdx; std::ignore = ox::findIdx(files.begin(), files.end(), ref.path).moveTo(m_selectedPaletteIdx); if (oldVal != m_selectedPaletteIdx) {