+2008-07-19 Adrian Robert <Adrian.B.Robert@gmail.com>
+
+ * nsfont.m (nsfont_fmember_to_entity, nsfont_make_fontset_for_font):
+ strdup() the family UTF8String before modifying it. Patch due to
+ Seiji Zenitani.
+
2008-07-19 Adrian Robert <Adrian.B.Robert@gmail.com>
* nsfns.m (ns_set_background_color): Apply patch from Chong Yidong to
unsigned int traits = [[famMember objectAtIndex: 3] unsignedIntValue];
/* NSString *psName = [famMember objectAtIndex: 0]; */
NSMutableString *suffix = [[famMember objectAtIndex: 1] mutableCopy];
- char *escapedFamily = [family UTF8String];
+ char *escapedFamily = strdup ([family UTF8String]);
nsfont_escape_name (escapedFamily);
[suffix replaceOccurrencesOfString: @" " withString: @"" options: 0
}
[suffix release];
+ free (escapedFamily);
return font_entity;
}
if (cfont != nil)
{
- char *family = [[cfont familyName] UTF8String];
+ char *family = strdup([[cfont familyName] UTF8String]);
Lisp_Object famAndReg;
nsfont_escape_name (family);
SDATA (SYMBOL_NAME (scripts[i])));
Fset_fontset_font (name, scripts[i], famAndReg, Qnil, Qnil);
+ free (family);
}
else
{