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:
parent
b0d87aae74
commit
38d3097672
@ -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)
|
||||
{
|
||||
|
BIN
src/testcases/org/apache/poi/hpsf/data/TestSolidWorks.sldprt
Normal file
BIN
src/testcases/org/apache/poi/hpsf/data/TestSolidWorks.sldprt
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user