Mercurial > hg > octave-max
changeset 5352:ac4a7df431d4
[project @ 2005-05-17 08:19:03 by dbateman]
author | dbateman |
---|---|
date | Tue, 17 May 2005 08:19:03 +0000 |
parents | 05adf9de7657 |
children | df230b7df93c |
files | src/ls-mat5.cc |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ls-mat5.cc +++ b/src/ls-mat5.cc @@ -921,11 +921,9 @@ bool utf8_multi_byte = false; for (int i = 0; i < n; i++) { - unsigned char a = static_cast<char> (re(i)); + unsigned char a = static_cast<unsigned char> (re(i)); if (a > 0x7f) utf8_multi_byte = true; - else - i++; } if (utf8_multi_byte) @@ -934,9 +932,9 @@ warning (" Replacing unreadable characters with '?'."); for (int i = 0; i < n; i++) { - unsigned char a = static_cast<char> (re(i)); + unsigned char a = static_cast<unsigned char> (re(i)); if (a > 0x7f) - re(i) = 0x3F; + re(i) = '?'; } } }