OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fd1f71
)
Fix an apparent bug in to_utf8_advance()
author
Jochen Tucht
<jtuc@users.sourceforge.net>
Sun, 6 Jun 2010 13:41:33 +0000
(13:41 +0000)
committer
Jochen Tucht
<jtuc@users.sourceforge.net>
Sun, 6 Jun 2010 13:41:33 +0000
(13:41 +0000)
Src/Common/unicoder.cpp
patch
|
blob
|
history
diff --git
a/Src/Common/unicoder.cpp
b/Src/Common/unicoder.cpp
index
0d211d4
..
d013076
100644
(file)
--- a/
Src/Common/unicoder.cpp
+++ b/
Src/Common/unicoder.cpp
@@
-281,7
+281,7
@@
int to_utf8_advance(unsigned int u, unsigned char * &lpd)
}
else if (u < 0x80000000)
{
- *lpd++ = 0xF
8
+ (u >> 30);
+ *lpd++ = 0xF
C
+ (u >> 30);
*lpd++ = 0x80 + ((u >> 24) & 0x3F);
*lpd++ = 0x80 + ((u >> 18) & 0x3F);
*lpd++ = 0x80 + ((u >> 12) & 0x3F);