From 7782a43060b539c962f2bcd1d036b282756f63bd Mon Sep 17 00:00:00 2001 From: lotus Date: Fri, 3 Oct 2008 11:36:17 +0000 Subject: [PATCH] fix if LANGUAGE: was not defined and the end of the query git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5242 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacysearch.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index f1d09f3d2..4baca3c8f 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -202,7 +202,8 @@ public class yacysearch { int lrp = querystring.indexOf("LANGUAGE:"); String lr = ""; if (lrp >= 0) { - lr = querystring.substring(lrp + 9, lrp + 11).toLowerCase(); + if (querystring.length() >= (lrp + 11)) + lr = querystring.substring(lrp + 9, lrp + 11).toLowerCase(); query[0].remove("language:" + lr); }