Avoid memory access functions that can cause memory exceptions in ImDebugger. Minor opt.

This commit is contained in:
Henrik Rydgård committed 2026-03-31 17:53:00 -06:00
1 parent 207a35f812
commit 10b6c14a9e
4 files changed
+22 -12

No files matched your search

+3
View File
@@ -1344,6 +1344,9 @@ void DrawMediaDecodersView(ImConfig &cfg, ImControl &control) {
if (ctx->BufferState() == ATRAC_STATUS_ALL_DATA_LOADED) {
if (ImGui::Button("Save to disk...")) {
System_BrowseForFileSave(cfg.requesterToken, "Save AT3 file", "song.at3", BrowseFileType::ATRAC3, [=](const std::string &filename, int) {
if (!Memory::IsValidRange(info.buffer, info.bufferByte)) {
return;
}
const u8 *data = Memory::GetPointerRange(info.buffer, info.bufferByte);
if (!data) {
return;