mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 08:20:02 -05:00
fix: Crash when trying to paste invalid data
This commit is contained in:
@@ -657,7 +657,11 @@ namespace hex::plugin::builtin {
|
||||
static void pasteBytes(const Region &selection, bool selectionCheck) {
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
|
||||
auto buffer = parseHexString(ImGui::GetClipboardText());
|
||||
auto clipboard = ImGui::GetClipboardText();
|
||||
if (clipboard == nullptr)
|
||||
return;
|
||||
|
||||
auto buffer = parseHexString(clipboard);
|
||||
|
||||
if (!selectionCheck) {
|
||||
if (selection.getStartAddress() + buffer.size() >= provider->getActualSize())
|
||||
|
||||
Reference in New Issue
Block a user