From 9c26fd0055e1915f3312b6bae1f3074aa4a4b1f8 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Wed, 16 May 2007 12:04:14 +0000 Subject: [PATCH] Fix for 146831, StringIndexoutOfBoundsException using source hover. --- .../org/eclipse/cdt/internal/ui/text/HTML2TextReader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java index 1e1fd0f323e..7e0b3a0e15a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000 2005 IBM Corporation and others. + * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * QNX Software System + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.internal.ui.text; @@ -110,7 +111,7 @@ public class HTML2TextReader extends SubstitutionTextReader { private String html2Text(String html) { String tag= html; - if ('/' == tag.charAt(0)) + if (tag.length() > 0 && '/' == tag.charAt(0)) tag= tag.substring(1); if (!fgTags.contains(tag))