diff --git a/extern/imgui_patched/imgui_internal.h b/extern/imgui_patched/imgui_internal.h index 3ec72742e..3d6a3a1d0 100644 --- a/extern/imgui_patched/imgui_internal.h +++ b/extern/imgui_patched/imgui_internal.h @@ -2563,7 +2563,7 @@ struct ImGuiTableColumn PrevEnabledColumn = NextEnabledColumn = -1; SortOrder = -1; SortDirection = ImGuiSortDirection_None; - DrawChannelCurrent = DrawChannelFrozen = DrawChannelUnfrozen = (ImU8)-1; + DrawChannelCurrent = DrawChannelFrozen = DrawChannelUnfrozen = (ImU32)-1; } }; diff --git a/extern/imgui_patched/imgui_tables.cpp b/extern/imgui_patched/imgui_tables.cpp index 9b67811c7..6aea054eb 100644 --- a/extern/imgui_patched/imgui_tables.cpp +++ b/extern/imgui_patched/imgui_tables.cpp @@ -1998,6 +1998,11 @@ void ImGui::TableBeginCell(ImGuiTable* table, int column_n) { // FIXME-TABLE: Could avoid this if draw channel is dummy channel? SetWindowClipRectBeforeSetChannel(window, column->ClipRect); + if (column->DrawChannelCurrent==(ImGuiTableDrawChannelIdx)-1) { + // temporary workaround for #502 + //printf("sorry!\n"); + column->DrawChannelCurrent=column_n; + } table->DrawSplitter->SetCurrentChannel(window->DrawList, column->DrawChannelCurrent); } diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index ea87e901e..d3d1ff23b 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -1852,6 +1852,9 @@ bool DivEngine::addWaveFromFile(const char* path, bool addRaw) { // read as .dmw reader.seek(0,SEEK_SET); int len=reader.readI(); + if (len<=0 || len>256) { + throw EndOfFileException(&reader,reader.size()); + } wave->max=(unsigned char)reader.readC(); if (wave->max==255) { // new wavetable format unsigned char waveVersion=reader.readC(); diff --git a/src/engine/platform/zxbeeper.cpp b/src/engine/platform/zxbeeper.cpp index 3ea42ede6..ff14d161c 100644 --- a/src/engine/platform/zxbeeper.cpp +++ b/src/engine/platform/zxbeeper.cpp @@ -208,6 +208,7 @@ int DivPlatformZXBeeper::dispatch(DivCommand c) { chan[c.chan].duty=c.value; break; case DIV_CMD_SAMPLE_MODE: + if (isMuted[c.chan]) break; curSample=c.value; curSamplePos=0; curSamplePeriod=0;