ソースを参照

charAt is throwing out of bounds, if empty string

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 6 年 前
コミット
b5f742f3ba

+ 1 - 1
src/main/java/com/owncloud/android/utils/DisplayUtils.java

@@ -252,7 +252,7 @@ public final class DisplayUtils {
 
         String urlNoDots = url;
         String dots = "";
-        while (urlNoDots.charAt(0) == '.') {
+        while (urlNoDots.length() > 0 && urlNoDots.charAt(0) == '.') {
             urlNoDots = url.substring(1);
             dots = dots + ".";
         }