Fix problem with search restart position being out by one, causing an array bounds exception in some cases.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4390 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-11-17 18:30:38 +00:00
parent d452a3890a
commit 45fface102

View File

@@ -230,12 +230,14 @@ public class AVMSearchContext extends SearchContext {
{
// Range check the resume id
if ( resumeId < 0 || resumeId >= m_fileList.length)
int resId = resumeId - 1;
if ( resId < 0 || resId >= m_fileList.length)
return false;
// Reset the current file index
m_fileIdx = resumeId;
m_fileIdx = resId;
return true;
}