[iortcw] 263/497: All: Fix reading 4 byte UTF-8 text input
Simon McVittie
smcv at debian.org
Fri Sep 8 10:37:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit 9b75bcccc386583c8dace8a338cb26cb2ff044c0
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date: Sat Dec 20 23:41:21 2014 +0000
All: Fix reading 4 byte UTF-8 text input
---
MP/code/sdl/sdl_input.c | 2 +-
SP/code/sdl/sdl_input.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MP/code/sdl/sdl_input.c b/MP/code/sdl/sdl_input.c
index 1e0b873..74d2c5f 100644
--- a/MP/code/sdl/sdl_input.c
+++ b/MP/code/sdl/sdl_input.c
@@ -776,7 +776,7 @@ static void IN_ProcessEvents( void )
else if( ( *c & 0xF8 ) == 0xF0 ) // 1111 0xxx
{
utf32 |= ( *c++ & 0x07 ) << 18;
- utf32 |= ( *c++ & 0x3F ) << 6;
+ utf32 |= ( *c++ & 0x3F ) << 12;
utf32 |= ( *c++ & 0x3F ) << 6;
utf32 |= ( *c++ & 0x3F );
}
diff --git a/SP/code/sdl/sdl_input.c b/SP/code/sdl/sdl_input.c
index 1e0b873..74d2c5f 100644
--- a/SP/code/sdl/sdl_input.c
+++ b/SP/code/sdl/sdl_input.c
@@ -776,7 +776,7 @@ static void IN_ProcessEvents( void )
else if( ( *c & 0xF8 ) == 0xF0 ) // 1111 0xxx
{
utf32 |= ( *c++ & 0x07 ) << 18;
- utf32 |= ( *c++ & 0x3F ) << 6;
+ utf32 |= ( *c++ & 0x3F ) << 12;
utf32 |= ( *c++ & 0x3F ) << 6;
utf32 |= ( *c++ & 0x3F );
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list