changeset 4094:ca992789c798 SDL-1.2

ANSI C fix (all variables need to be defined at start of block). Fixes Bugzilla #487.
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 01 Sep 2007 17:25:24 +0000
parents 7ea10b80eda3
children f733c048a94f
files src/video/x11/SDL_x11events.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11events.c	Tue Aug 21 06:52:33 2007 +0000
+++ b/src/video/x11/SDL_x11events.c	Sat Sep 01 17:25:24 2007 +0000
@@ -235,11 +235,11 @@
     Uint8 const *const end_of_input = utf8 + utf8_length - 1;
 
     while (utf8 <= end_of_input) {
+	Uint8 const c = *utf8;
 	if (p >= max_ptr) {
 	    /* No more output space.  */
 	    return -1;
 	}
-	Uint8 const c = *utf8;
 	if (c < 0x80) {
 	    /* One byte ASCII.  */
 	    *p++ = c;