aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/hashtable.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/hashtable.cpp b/src/hashtable.cpp
index 9dfe653..49d9236 100644
--- a/src/hashtable.cpp
+++ b/src/hashtable.cpp
@@ -212,6 +212,27 @@ const void *HashTable::get( const void *id, unsigned long int nSkip )
212 } 212 }
213 } 213 }
214 214
215 if( bAllowDupes )
216 {
217 int nOldPos = nPos;
218 for( nPos++; nPos != nOldPos; nPos=(nPos+1)%nTableSize )
219 {
220 if( !isFilled( nPos ) ) return NULL;
221 if( hFunc->cmpIDs( id, aTable[nPos].id ) &&
222 aTable[nPos].bDeleted == false )
223 {
224 if( nSkip == 0 )
225 {
226 return aTable[nPos].data;
227 }
228 else
229 {
230 nSkip--;
231 }
232 }
233 }
234 }
235
215 return NULL; 236 return NULL;
216} 237}
217 238