From 67d8cba3a0f09f26e6928d88f998a879f39828a9 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 1 Sep 2007 17:25:24 +0000 Subject: [PATCH] ANSI C fix (all variables need to be defined at start of block). Fixes Bugzilla #487. --- src/video/x11/SDL_x11events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 4c48a1805..2256685ff 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -235,11 +235,11 @@ static int Utf8ToUtf16(const Uint8 *utf8, const int utf8_length, Uint16 *utf16, 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;