Buf fix plus testcasde: Reading property values failed with a StringIndexOutOfBoundsException on empty strings.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rainer Klute 2004-01-08 14:25:35 +00:00
parent a24f1136d0
commit 11850930ed
2 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ public class Property
b.append((char) src[o + j]);
/* Strip 0x00 characters from the end of the string: */
while (b.charAt(b.length() - 1) == 0x00)
while (b.length() > 0 && b.charAt(b.length() - 1) == 0x00)
b.setLength(b.length() - 1);
if (codepage == CP_UNICODE)
{