Article # 171, added by Geoworks, historical record
| first | previous | index | next | last |

Death due to CORRUPTED_INI_FILE




Death due to CORRUPTED_INI_FILE

Concepts docs say this:
InitFileWriteString() takes a pointer to the null-terminated character
string to be written. If the character string contains carriage returns
or line feeds, it will automatically be converted into a blob.

Caveat is this:
The problem is in documentation.  The string you pass in must
have carriage return and linefeed pairs (i.e., "\r\n") seperating
the items in the blob.  Using "\r" or "\n" alone will not work.

For example, this code:
    InitFileWriteString("MyCat","MyKey","AAA\r\nBBB\r\nCCC");
    InitFileSave();
    InitFileCommit();

Will work properly and create this INI entry:
    [MyCat]
    MyKey = {
    AAA
    BBB
    CCC
    }