Squashed 'deps/nostalgia/' changes from d68e6493..6b53eaf6

6b53eaf6 [ox/std] Fix string append issues
16c32273 [nostalgia/core/studio/tilesheeteditor] Fix palette drop target to only take palettes
1567a6e2 [applib] Fix build
89d543bc Merge commit '7b7d59cf63d77cf7ab6daf6ed7122eef97954555'

git-subtree-dir: deps/nostalgia
git-subtree-split: 6b53eaf6b1d8f4caadea8df8ec6e4c09e37993b4
This commit is contained in:
Gary Talent 2025-01-19 18:11:38 -06:00
parent 7b7d59cf63
commit 83055a96b5
2 changed files with 3 additions and 3 deletions

View File

@ -392,7 +392,7 @@ template<std::size_t SmallStringSize_v>
constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operator+(const char *str) const noexcept {
const std::size_t strLen = ox::strlen(str);
const auto currentLen = len();
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
BasicString<SmallStringSize_v> 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<SmallStringSize_v> BasicString<SmallStringSize_v>::operato
const std::size_t strLen = src.len();
const auto currentLen = len();
BasicString<SmallStringSize_v> 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;

View File

@ -445,7 +445,7 @@ void TileSheetEditorImGui::drawPaletteMenu() noexcept {
}
if (ig::DragDropTarget const dragDropTarget; dragDropTarget) {
auto const [ref, err] = ig::getDragDropPayload<studio::FileRef>("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) {