From ceef67e12698b830f10253080f299774fb29a47a Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Fri, 15 Jul 2011 12:45:24 +0000 Subject: [PATCH] prevent index out of range exception git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147126 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hwpf/converter/AbstractWordConverter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java index 5a6221e8bd..e5fd7382cc 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -119,8 +119,8 @@ public abstract class AbstractWordConverter currentTableLevel, aliveField, block ); int continueAfter = aliveField.getEndOffset(); - while ( range.getCharacterRun( c ).getEndOffset() <= continueAfter - && c < range.numCharacterRuns() ) + while ( c < range.numCharacterRuns() + && range.getCharacterRun( c ).getEndOffset() <= continueAfter ) c++; if ( c < range.numCharacterRuns() ) -- 2.39.5