From: Alp Aker Date: Fri, 17 Aug 2012 04:12:50 +0000 (-0400) Subject: * nsfont.m (ns_ascii_average_width): Send initWithFormat selector X-Git-Tag: emacs-24.2.90~640 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93044f7b87430236c1cb661d9e122f9d65cb24d1;p=emacs.git * nsfont.m (ns_ascii_average_width): Send initWithFormat selector to an allocated instance of NSString, not to the class itself. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5e400b20a31..a3ae89b86f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-08-17 Alp Aker + + * nsfont.m (ns_ascii_average_width): Send initWithFormat selector + to an allocated instance of NSString, not to the class itself. + 2012-08-17 Juanma Barranquero * makefile.w32-in (C_CTYPE_H): New macro. diff --git a/src/nsfont.m b/src/nsfont.m index fdb6e0c33c1..1f8d28cd238 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -275,7 +275,7 @@ ns_ascii_average_width (NSFont *sfont) for (ch = 0; ch < 95; ch++) chars[ch] = ' ' + ch; - ascii_printable = [NSString initWithFormat: @"%s", chars]; + ascii_printable = [[NSString alloc] initWithFormat: @"%s", chars]; } #ifdef NS_IMPL_COCOA