Commit 3bc2f321 authored by Evan W. Patton's avatar Evan W. Patton Committed by Evan Patton

Fix hex length parsing bug

Change-Id: If66538c363b19b001a065ebc72e73a73927da7a7
parent 5e7c2cd3
......@@ -160,7 +160,7 @@ public abstract class ColorChoicePropertyEditor extends PropertyEditor {
this.colors = colors;
this.advanced = advanced;
if (defaultValue.startsWith(hexPrefix)) {
this.defaultValue = defaultValue.substring(hexPrefix.length()-6); // Take last 6 digits (assumes RRGGBB format)
this.defaultValue = defaultValue.substring(defaultValue.length()-6); // Take last 6 digits (assumes RRGGBB format)
this.defaultValueArgb = Long.valueOf("FF" + this.defaultValue, 16) & 0xFFFFFFFFL;
} else {
this.defaultValue = defaultValue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment