Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/simpleini.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrodie Thiesfield <brofield@gmail.com>2009-06-09 11:04:04 +0400
committerBrodie Thiesfield <brofield@gmail.com>2009-06-09 11:04:04 +0400
commit2e7f1a18e9a2682e2d370c5353bc4c22599b237d (patch)
treedede65a50fe7997fe64518fe8c195ae29c6171e9
parentfff7706d85793f3efeb17d4d8b7fdd162ab5b7a9 (diff)
* ensure that newlines are converted in section comments
-rw-r--r--SimpleIni.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/SimpleIni.h b/SimpleIni.h
index b648939..7e33d50 100644
--- a/SimpleIni.h
+++ b/SimpleIni.h
@@ -5,7 +5,7 @@
<tr><th>File <td>SimpleIni.h
<tr><th>Author <td>Brodie Thiesfield [code at jellycan dot com]
<tr><th>Source <td>http://code.jellycan.com/simpleini/
- <tr><th>Version <td>4.9
+ <tr><th>Version <td>4.9.1
</table>
Jump to the @link CSimpleIniTempl CSimpleIni @endlink interface documentation.
@@ -2201,15 +2201,13 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::Save(
for ( ; iSection != oSections.end(); ++iSection ) {
// write out the comment if there is one
if (iSection->pComment) {
- if (!convert.ConvertToStore(iSection->pComment)) {
- return SI_FAIL;
- }
if (bNeedNewLine) {
a_oOutput.Write(SI_NEWLINE_A);
a_oOutput.Write(SI_NEWLINE_A);
}
- a_oOutput.Write(convert.Data());
- a_oOutput.Write(SI_NEWLINE_A);
+ if (!OutputMultiLineText(a_oOutput, convert, iSection->pComment)) {
+ return SI_FAIL;
+ }
bNeedNewLine = false;
}