[Libreoffice-commits] core.git: filter/source
Tor Lillqvist
tml at collabora.com
Mon Dec 9 00:13:58 PST 2013
filter/source/xmlfilterdetect/filterdetect.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 74ca95edd1bd3c00cf314690fe22171ec93d6885
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Dec 9 10:12:49 2013 +0200
WaE: C4310: cast truncates constant value
Change-Id: I187382713aa85fa43e674f96e0a8cfb1f7ac0d03
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index 27f173a..0b36b3d 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -79,10 +79,10 @@ bool isXMLStream(const OString& aHeaderStrm)
size_t i = 0;
// Skip UTF-8 BOM
- const char sBOM[] = {(char)0xEF, (char)0xBB, (char)0xBF};
+ const unsigned char sBOM[] = {0xEF, 0xBB, 0xBF};
for (i = 0; i < n; ++i, ++p)
{
- if (i < 3 && *p == sBOM[i])
+ if (i < 3 && (unsigned char)(*p) == sBOM[i])
continue;
else if (i == 3 || i == 0)
break;
More information about the Libreoffice-commits
mailing list