mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* nsfont.m (ns_ascii_average_width): Ensure the string
ascii_printable is initialized with a null-terminated character array. Otherwise, it can contain undesired extra characters.
This commit is contained in:
parent
e757f1c6f3
commit
d7191076ce
2 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
|
||||
|
||||
* nsfont.m (ns_ascii_average_width): Ensure the string
|
||||
ascii_printable is initialized with a null-terminated character
|
||||
array. Otherwise, it can contain undesired extra characters.
|
||||
|
||||
2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
port new setting code to Sun C 5.8 2005/10/13
|
||||
|
|
|
|||
|
|
@ -270,10 +270,11 @@ static void ns_glyph_metrics (struct nsfont_info *font_info,
|
|||
|
||||
if (!ascii_printable)
|
||||
{
|
||||
char chars[95];
|
||||
char chars[96];
|
||||
int ch;
|
||||
for (ch = 0; ch < 95; ch++)
|
||||
chars[ch] = ' ' + ch;
|
||||
chars[95] = '\0';
|
||||
|
||||
ascii_printable = [[NSString alloc] initWithFormat: @"%s", chars];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue