summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2018-07-28 14:23:19 +0200
committerChristian Beier <dontmind@freeshell.org>2018-07-30 19:15:25 +0200
commitb0957702a88e6547ecca252165cef4a653239fec (patch)
treed7d3776a155f43536a2e187419c103625461f34e
parenta2b5284e077b2905656ee77675d8b8949df0497c (diff)
downloadlibtdevnc-b0957702a88e6547ecca252165cef4a653239fec.tar.gz
libtdevnc-b0957702a88e6547ecca252165cef4a653239fec.zip
SDLvncviewer: adhere to C89
-rw-r--r--client_examples/SDLvncviewer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c
index 9c509b0..67820a8 100644
--- a/client_examples/SDLvncviewer.c
+++ b/client_examples/SDLvncviewer.c
@@ -181,7 +181,8 @@ static rfbKeySym utf8char2rfbKeySym(const char chr[4]) {
int bytes = strlen(chr);
int shift = utf8Mapping[0].bits_stored * (bytes - 1);
rfbKeySym codep = (*chr++ & utf8Mapping[bytes].mask) << shift;
- for(int i = 1; i < bytes; ++i, ++chr) {
+ int i;
+ for(i = 1; i < bytes; ++i, ++chr) {
shift -= utf8Mapping[0].bits_stored;
codep |= ((char)*chr & utf8Mapping[0].mask) << shift;
}