From af747fbbec0132a07378e010034ceffd73ce2e7f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 5 Oct 2015 22:21:27 +0300 Subject: [PATCH] Fix https://github.com/osmandapp/Osmand/issues/1770 #1770 --- OsmAnd-java/src/net/osmand/util/Algorithms.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/util/Algorithms.java b/OsmAnd-java/src/net/osmand/util/Algorithms.java index adcc4e0411..09a3ed4f87 100644 --- a/OsmAnd-java/src/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/net/osmand/util/Algorithms.java @@ -219,14 +219,14 @@ public class Algorithms { public static int parseColor(String colorString) { if (colorString.charAt(0) == '#') { // Use a long to avoid rollovers on #ffXXXXXX - long color = Long.parseLong(colorString.substring(1), 16); - if (colorString.length() == 4) { + if (colorString.length() == 4) { colorString = "#" + colorString.charAt(1) + colorString.charAt(1) + colorString.charAt(2) + colorString.charAt(2) + colorString.charAt(3) + colorString.charAt(3); } + long color = Long.parseLong(colorString.substring(1), 16); if (colorString.length() == 7) { // Set the alpha value color |= 0x00000000ff000000;