mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
fix: Potential crashes when pasting with no clipboard content
This commit is contained in:
@@ -1222,6 +1222,8 @@ namespace hex::plugin::builtin {
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
|
||||
std::string clipboard = ImGui::GetClipboardText();
|
||||
if (clipboard.empty())
|
||||
return;
|
||||
|
||||
// Check for non-hex characters
|
||||
bool isValidHexString = std::find_if(clipboard.begin(), clipboard.end(), [](char c) {
|
||||
|
||||
Reference in New Issue
Block a user