Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
// special handling for RX-V3900, where 'A1' becomes 101 and 'B2' becomes 202 preset
if (presetValue.length() >= 2) {
Character presetAlpha = presetValue.charAt(0);
- if (Character.isLetter(presetAlpha) && Character.isUpperCase(presetAlpha)) {
+ if (Character.isLetter(presetAlpha) && Character.isUpperCase(presetAlpha)
+ && Character.isDigit(presetValue.charAt(1))) {
int presetNumber = Integer.parseInt(presetValue.substring(1));
return (ArrayUtils.indexOf(LETTERS, presetAlpha) + 1) * 100 + presetNumber;
}