Compare commits

..

4 Commits

Author SHA1 Message Date
6b53eaf6b1 [ox/std] Fix string append issues
All checks were successful
Build / build (push) Successful in 3m22s
2025-01-19 16:51:05 -06:00
16c32273ac [nostalgia/core/studio/tilesheeteditor] Fix palette drop target to only take palettes 2025-01-19 16:49:31 -06:00
1567a6e29d [applib] Fix build 2025-01-19 14:32:08 -06:00
89d543bcbc Merge commit '7b7d59cf63d77cf7ab6daf6ed7122eef97954555' 2025-01-19 13:39:31 -06:00
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) {