From: H.G. Muller Date: Tue, 12 Apr 2011 08:13:40 +0000 (+0200) Subject: Fix saving of XBoard fonts with spaces in name X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f37dda1a9dcf0e864d556b086809d3561806b9e3;p=xboard.git Fix saving of XBoard fonts with spaces in name SaveFontArg now prints quotes around the saved font string, so that the general option-argument parser doesnot stop at the first space it sees. --- diff --git a/xboard.c b/xboard.c index 452255e..d216fe8 100644 --- a/xboard.c +++ b/xboard.c @@ -1509,7 +1509,7 @@ SaveFontArg(FILE *f, ArgDescriptor *ad) break; } for(i=0; iargName, i, fontTable[n][i]); + fprintf(f, OPTCHAR "%s" SEPCHAR "\"size%d:%s\"\n", ad->argName, i, fontTable[n][i]); } void @@ -3062,7 +3062,6 @@ FindFont(pattern, targetPxlSize) char *def_string, *base_fnt_lst, strInt[3]; XFontSet fntSet; XFontStruct **fnt_list; - base_fnt_lst = calloc(1, strlen(pattern) + 3); snprintf(strInt, sizeof(strInt)/sizeof(strInt[0]), "%d", targetPxlSize); p = strstr(pattern, "--");