Changeset 5286

Show
Ignore:
Timestamp:
02/19/08 16:55:26 (11 months ago)
Author:
morris
Message:

Avoid off-by-one

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/collections/wi-hash.c

    r5283 r5286  
    538538        _wi_hash_bucket_t               *bucket; 
    539539         
    540         while(context->index < hash->buckets_count) { 
     540        while(true) { 
    541541                bucket = context->bucket; 
    542542                 
     
    552552                        } 
    553553                } 
     554 
     555                if(context->index >= hash->buckets_count) 
     556                        break; 
    554557                 
    555558                bucket = hash->buckets[context->index];