summaryrefslogtreecommitdiff
path: root/Source/utf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/utf.cpp')
-rwxr-xr-xSource/utf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/utf.cpp b/Source/utf.cpp
index 7658552..3bb4eba 100755
--- a/Source/utf.cpp
+++ b/Source/utf.cpp
@@ -3,7 +3,7 @@
*
* This file is a part of NSIS.
*
- * Copyright (C) 2011-2016 Anders Kjersem
+ * Copyright (C) 2011-2017 Anders Kjersem
*
* Licensed under the zlib/libpng license (the "License");
* you may not use this file except in compliance with the License.
@@ -331,11 +331,11 @@ WORD GetEncodingFromString(const TCHAR*s, bool&BOM)
if (!_tcsicmp(s,_T("ACP"))) return NStreamEncoding::ACP;
if (!_tcsicmp(s,_T("OEM"))) return NStreamEncoding::OEMCP;
if (!_tcsicmp(s,_T("UTF8"))) return NStreamEncoding::UTF8;
- if ((!_tcsicmp(s,_T("UTF8SIG")) || !_tcsicmp(s,_T("UTF8BOM"))) && ++BOM)
+ if ((!_tcsicmp(s,_T("UTF8SIG")) || !_tcsicmp(s,_T("UTF8BOM"))) && (BOM = true))
return NStreamEncoding::UTF8;
- if (!_tcsicmp(s,_T("UTF16LE")) || (!_tcsicmp(s,_T("UTF16LEBOM")) && ++BOM))
+ if (!_tcsicmp(s,_T("UTF16LE")) || (!_tcsicmp(s,_T("UTF16LEBOM")) && (BOM = true)))
return NStreamEncoding::UTF16LE;
- if (!_tcsicmp(s,_T("UTF16BE")) || (!_tcsicmp(s,_T("UTF16BEBOM")) && ++BOM))
+ if (!_tcsicmp(s,_T("UTF16BE")) || (!_tcsicmp(s,_T("UTF16BEBOM")) && (BOM = true)))
return NStreamEncoding::UTF16BE;
if (S7IsChEqualI('C',*s++) && S7IsChEqualI('P',*s++))
{