Ghidra is a software reverse engineering (SRE) framework
GP-4874: AskDialog now uses Integer.decode() and Long.decode() to parse better
Ryan Kurtz363344300701
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/script/AskDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/script/AskDialog.javaindex a89ce3495e..a82350b244 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/script/AskDialog.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/script/AskDialog.java@@ -4,9 +4,9 @@* Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at- *+ ** http://www.apache.org/licenses/LICENSE-2.0- *+ ** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@@ -246,21 +246,12 @@ public class AskDialog<T> extends DialogComponentProvider {protected Integer getValueAsInt() {String text = getValueAsString();- if (text == null) {- return null;- }- if (text.startsWith("0x")) {- return (int) NumericUtilities.parseHexLong(text);- }- return (int) NumericUtilities.parseLong(text);+ return text != null ? Integer.decode(text) : null;}protected Long getValueAsLong() {String text = getValueAsString();- if (text == null) {- return null;- }- return NumericUtilities.parseLong(text);+ return text != null ? Long.decode(text) : null;}protected Double getValueAsDouble() {