Changeset ad78e08


Ignore:
Timestamp:
Aug 31, 2021, 1:49:10 AM (5 months ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
jacob/cs343-translation, master
Children:
d8db0af
Parents:
e4b37a1
git-author:
Jacob Prud'homme <jafprudhomme@…> (08/03/21 13:28:06)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
Message:

Added case to handle initial allocation for KVP array

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    re4b37a1 rad78e08  
    4040
    4141void add_kv_pair( KVPairs & kv_pairs, char * k, char * v ) with ( kv_pairs ) {
    42         if ( size == max_size ) {
     42        if ( max_size == 0 ) {
     43                max_size = 1;
     44                data = alloc( max_size );
     45        } else if ( size == max_size ) {
    4346                max_size *= 2;
    4447                data = resize( data, max_size );
Note: See TracChangeset for help on using the changeset viewer.