From d1e86ed4451ab22797f5383166bdb438e469a701 Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Sat, 6 Jun 2009 18:22:00 +0000 Subject: [PATCH] Casting fix seems to be preventing crashing. --- src/fonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fonts.c b/src/fonts.c index 0231ffa34..25fd83ff4 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -631,8 +631,8 @@ void receive_some_font_info(SDL_Surface * screen) show_progress_bar(screen); walk = buf; - num_font_families = *walk++; - num_font_families += *walk++ << 8u; + num_font_families = *(unsigned char *)walk++; + num_font_families += *(unsigned char *)walk++ << 8u; #ifdef DEBUG printf("Got %u bytes with %u families.\n", buf_fill, num_font_families); #endif