|
|
@@ -68,8 +68,10 @@ static int _write_ini_file(FILE* file, const ini_datum* schema, |
|
|
|
|
|
|
|
|
if (ini_string == schema->type) { |
|
|
if (ini_string == schema->type) { |
|
|
const char* str = *(char**)ptr; |
|
|
const char* str = *(char**)ptr; |
|
|
if (!needs_quotes(str)) fputs(str, file); |
|
|
|
|
|
else fprintf(file, "\"%s\"", str); |
|
|
|
|
|
|
|
|
if (NULL != str) { |
|
|
|
|
|
if (!needs_quotes(str)) fputs(str, file); |
|
|
|
|
|
else fprintf(file, "\"%s\"", str); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} else if (ini_integer == schema->type) { |
|
|
} else if (ini_integer == schema->type) { |
|
|
fprintf(file, "%d", *(uint32_t*)ptr); |
|
|
fprintf(file, "%d", *(uint32_t*)ptr); |
|
|
|