Skip to content

Commit

Permalink
0.9.14 release
Browse files Browse the repository at this point in the history
  • Loading branch information
metayeti committed May 27, 2022
1 parent 4399b55 commit a1ff72e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.9.14 (May 27, 2022)
- `BUGFIX` - Fixes C4310 warning. ([#19](https://github.com/pulzed/mINI/issues/19))

## 0.9.13 (April 25, 2022)
- `BUGFIX` - Writer now understands UTF-8 BOM-encoded files. ([#7](https://github.com/pulzed/mINI/issues/17))
- `BUGFIX` - Fixes a bug introduced in 0.9.12 where reader would break when reading empty files.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mINI

v0.9.13
v0.9.14

## Info

Expand Down
14 changes: 11 additions & 3 deletions src/mini/ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

///////////////////////////////////////////////////////////////////////////////
//
// /mINI/ v0.9.13
// /mINI/ v0.9.14
// An INI file reader and writer for the modern age.
//
///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -349,7 +349,11 @@ namespace mINI
static_cast<char>(fileReadStream.get()),
static_cast<char>(fileReadStream.get())
};
isBOM = header[0] == (char)0xEF && header[1] == (char)0xBB && header[2] == (char)0xBF;
isBOM = (
header[0] == static_cast<char>(0xEF) &&
header[1] == static_cast<char>(0xBB) &&
header[2] == static_cast<char>(0xBF)
);
}
else {
isBOM = false;
Expand Down Expand Up @@ -708,7 +712,11 @@ namespace mINI
if (fileWriteStream.is_open())
{
if (fileIsBOM) {
const char utf8_BOM[3] = {(char)0xEF, (char)0xBB, (char)0xBF};
const char utf8_BOM[3] = {
static_cast<char>(0xEF),
static_cast<char>(0xBB),
static_cast<char>(0xBF)
};
fileWriteStream.write(utf8_BOM, 3);
}
if (output.size())
Expand Down

0 comments on commit a1ff72e

Please sign in to comment.