From d24bfcea935f677edf7d8e51a1b79009701d1504 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Tue, 5 Jul 2011 11:58:50 +0000 Subject: [PATCH] handle empty strings git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143012 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hwpf/usermodel/TableRow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java index dd522de68..015c6141b 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java @@ -50,8 +50,8 @@ public final class TableRow Paragraph p = getParagraph(start); String s = p.text(); - while (! ( (s.charAt(s.length() - 1) == TABLE_CELL_MARK) || - p.isEmbeddedCellMark() && p.getTableLevel() == levelNum)) + while (! ( s.length() > 0 && (s.charAt(s.length() - 1) == TABLE_CELL_MARK) || + p.isEmbeddedCellMark() && p.getTableLevel() == levelNum) && end < endIdx) { end++; p = getParagraph(end);