includes/hex: Fixed duplicate variable name in hex::core::get_selection() function

Fixes #167
This commit is contained in:
Nik
2023-09-25 07:22:06 +02:00
committed by GitHub
parent 7ecd6d87dd
commit bca25b1a78

View File

@@ -21,20 +21,20 @@ namespace hex::core {
@return The current selection @return The current selection
*/ */
fn get_selection() { fn get_selection() {
u128 result = builtin::hex::core::get_selection(); u128 selection = builtin::hex::core::get_selection();
Selection result; Selection result;
if (result == u128(-1)) { if (selection == u128(-1)) {
result.valid = false; result.valid = false;
result.address = 0x00; result.address = 0x00;
result.size = 0x00; result.size = 0x00;
} else { } else {
result.valid = true; result.valid = true;
result.address = result >> 64; result.address = selection >> 64;
result.size = result & u64(-1); result.size = selection & u64(-1);
} }
return result; return result;
}; };
} }