From 8d1d780b73be131b3bc9d5631af94058580eb1ef Mon Sep 17 00:00:00 2001 From: Shin-ichi TOYAMA Date: Fri, 22 Aug 2014 14:43:08 +0000 Subject: [PATCH] Fixed crash bug when loading label including whitespace. --- src/tuxpaint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index d16e45122..afa90ab88 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -20604,7 +20604,7 @@ static void load_info_about_label_surface(FILE * lfi) wchar_t *wtmpstr; tmpstr = malloc(1024); wtmpstr = malloc(1024); - fscanf(lfi, "%s\n", tmpstr); + fgets(tmpstr, 1024, lfi); mtw(wtmpstr, tmpstr); for(l = 0; l < new_node->save_texttool_len; l++) {