Commits

Julian Brost committed 7eedc8e

Fixed #127: Check for short date strings in parseRssDate().

  • Participants
  • Parent commits d2b3f7a
  • Branches stable

Comments (0)

Files changed (1)

File src/net/x4a42/volksempfaenger/feedparser/FeedParser.java

 package net.x4a42.volksempfaenger.feedparser;
 
-import android.annotation.SuppressLint;
 import java.io.IOException;
 import java.io.Reader;
 import java.net.MalformedURLException;
 			}
 			datestring = datestring.trim();
 
-			if (datestring.charAt(8) == ' ') {
-				if (datestring.charAt(14) == ' ') {
+			if (datestring.length() > 8 && datestring.charAt(8) == ' ') {
+				if (datestring.length() > 16 && datestring.charAt(14) == ' ') {
 					format = formats[0];
 				} else {
 					format = formats[1];
 				}
 			} else {
-				if (datestring.charAt(16) == ' ') {
+				if (datestring.length() > 16 && datestring.charAt(16) == ' ') {
 					format = formats[2];
 				} else {
 					format = formats[3];