Changeset 167 for trunk/thune/make.c

Show
Ignore:
Timestamp:
06/04/06 04:58:45 (3 years ago)
Author:
krobillard
Message:

Fixed a couple cases where reading beyond end of buffer.
Optimized ur_arrayErase() when elemSize == 16 and WORDSIZE == 64.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/make.c

    r166 r167  
    142142    if( ur_stringSlice( cell, &cpA, &cpB ) ) 
    143143    { 
    144         int count; 
    145144        int size; 
    146145        UBinary* bin; 
    147146 
    148         count = cpB - cpA; 
    149         size =  count * ur_encCharSize( cell ); 
     147        size = cpB - cpA; 
    150148        binN = ur_makeBinary( size ); 
    151149        if( size ) 
     
    153151            bin = ur_binPtr( binN ); 
    154152            memCpy( bin->ptr.b, cpA, size ); 
    155             bin->used = count; 
     153            bin->used = size; 
    156154        } 
    157155    }