Ignore:
Timestamp:
Sep 5, 2023, 2:57:01 PM (9 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
3c7e3c4, aae9c17
Parents:
acafba4
Message:

Port basic input-manipulator test from cstring to string and fix resulting bug.

Bug was ignore(...s...) overwriting s with garbage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/string.cfa

    racafba4 rf54e6ec  
    149149                cont = true;
    150150        } finally {
    151                 f.s = cstr;                                                                             // ok to initialize string
     151        if ( ! cf.flags.ignore ) f.s = cstr;                    // ok to initialize string
    152152        } // try
    153153        for ( ; cont; )  {                                                                      // overflow read ?
     
    158158                        cont = true;                                                            // continue not allowed
    159159                } finally {
    160                         f.s += cstr;                                                            // build string chunk at a time
     160                        if ( ! cf.flags.ignore ) f.s += cstr;           // build string chunk at a time
    161161                } // try
    162162        } // for
Note: See TracChangeset for help on using the changeset viewer.