]> git.lyx.org Git - lyx.git/commitdiff
Fix debug output (detected by a MSVC warning)
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 8 Oct 2006 10:31:34 +0000 (10:31 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 8 Oct 2006 10:31:34 +0000 (10:31 +0000)
* src/support/unicode.C
(iconv_convert): Use boost::uint32_t for storing a buffer character,
since the previously stored unsigned char is too small. I did not
use lyx::char_type on purpose because that might not be interpreted
as number, but as wide character if lyx::char_type == wchar_t.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15278 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/unicode.C

index ae832fdd3b9f9019e0162408b1eb21f02881af7d..97e88c94fa64f6e9b08399a7b5df7978cd97dc4f 100644 (file)
@@ -84,8 +84,8 @@ iconv_convert(iconv_t * cd,
                               << " to " << tocode << ".\n";
                        lyxerr << "Input: " << std::hex;
                        for (size_t i = 0; i < buflen; ++i) {
-                               unsigned char const b = buf[i];
-                               lyxerr << "0x" << int(b) << " ";
+                               boost::uint32_t const b = buf[i];
+                               lyxerr << "0x" << b << " ";
                        }
                        lyxerr << endl;
                        break;
@@ -96,8 +96,8 @@ iconv_convert(iconv_t * cd,
                               << " to " << tocode << ".\n";
                        lyxerr << "Input: " << std::hex;
                        for (size_t i = 0; i < buflen; ++i) {
-                               unsigned char const b = buf[i];
-                               lyxerr << "0x" << int(b) << " ";
+                               boost::uint32_t const b = buf[i];
+                               lyxerr << "0x" << b << " ";
                        }
                        lyxerr << endl;
                        break;