mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[227057] Memory Find/Replace Dialog does not allow binary value as 0b...
This commit is contained in:
parent
d8f5b3b912
commit
7312a2b778
1 changed files with 3 additions and 2 deletions
|
@ -135,7 +135,8 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
}
|
||||
else if(formatBinaryButton.getSelection())
|
||||
{
|
||||
phrase = new BigIntegerSearchPhrase(new BigInteger(findText.getText(), 2), 2);
|
||||
phrase = new BigIntegerSearchPhrase(new BigInteger(findText.getText().toUpperCase().startsWith("0B")
|
||||
? findText.getText().substring(2) : findText.getText(), 2), 2);
|
||||
}
|
||||
else if(formatDecimalButton.getSelection())
|
||||
{
|
||||
|
@ -187,7 +188,7 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
else if(formatOctalButton.getSelection())
|
||||
return removeZeroPrefixByte(new BigInteger(replaceText.getText().startsWith("0") ? replaceText.getText().substring(1) : replaceText.getText(), 8).toByteArray());
|
||||
else if(formatBinaryButton.getSelection())
|
||||
return removeZeroPrefixByte(new BigInteger(replaceText.getText(), 2).toByteArray());
|
||||
return removeZeroPrefixByte(new BigInteger(replaceText.getText().toUpperCase().startsWith("0B") ? replaceText.getText().substring(2) : replaceText.getText(), 2).toByteArray());
|
||||
else if(formatDecimalButton.getSelection())
|
||||
return removeZeroPrefixByte(new BigInteger(replaceText.getText(), 10).toByteArray());
|
||||
else if(formatByteSequenceButton.getSelection())
|
||||
|
|
Loading…
Add table
Reference in a new issue