# HG changeset patch # User Michael Pavone # Date 1470461083 25200 # Node ID 624696318b5b2169a57d5d4e298fa14e946e7121 # Parent 96db3e289ed175799bf54dd94c4458f56749725e Fix a memory corruption bug from failing to grow the buffer for the window caption when switching games diff -r 96db3e289ed1 -r 624696318b5b render_sdl.c --- a/render_sdl.c Fri Aug 05 22:24:36 2016 -0700 +++ b/render_sdl.c Fri Aug 05 22:24:43 2016 -0700 @@ -234,6 +234,7 @@ } char * caption = NULL; +char * fps_caption = NULL; static void render_quit() { @@ -412,6 +413,8 @@ void render_update_caption(char *title) { caption = title; + free(fps_caption); + fps_caption = NULL; } void render_context(vdp_context * context) @@ -715,8 +718,6 @@ return 0; } -char * fps_caption = NULL; - uint32_t frame_counter = 0; uint32_t start = 0; #ifdef __ANDROID__