Changeset 5348

Show
Ignore:
Timestamp:
03/11/08 05:47:19 (4 months ago)
Author:
morris
Message:

Set correct lengths

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/data/wi-string.c

    r5347 r5348  
    271271wi_string_t * wi_string_init_with_cstring_no_copy(wi_string_t *string, char *cstring, wi_boolean_t free) { 
    272272        string->length          = strlen(cstring); 
    273         string->capacity        = string->capacity
     273        string->capacity        = string->length + 1
    274274        string->string          = cstring; 
    275275        string->free            = free; 
     
    307307 
    308308wi_string_t * wi_string_init_with_bytes_no_copy(wi_string_t *string, void *buffer, wi_uinteger_t size, wi_boolean_t free) { 
    309         string->length          = size
    310         string->capacity        = string->capacity
     309        string->length          = strlen(buffer)
     310        string->capacity        = string->length + 1
    311311        string->string          = buffer; 
    312312        string->free            = free;