[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109677: * nsfont.m (ns_ascii_average
From: |
Alp Aker |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109677: * nsfont.m (ns_ascii_average_width): Ensure the string |
Date: |
Sat, 18 Aug 2012 20:53:29 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109677
committer: Alp Aker <address@hidden>
branch nick: trunk
timestamp: Sat 2012-08-18 20:53:29 -0400
message:
* 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.
modified:
src/ChangeLog
src/nsfont.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-08-18 23:53:43 +0000
+++ b/src/ChangeLog 2012-08-19 00:53:29 +0000
@@ -1,3 +1,9 @@
+2012-08-18 Alp Aker <address@hidden>
+
+ * 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 <address@hidden>
port new setting code to Sun C 5.8 2005/10/13
=== modified file 'src/nsfont.m'
--- a/src/nsfont.m 2012-08-17 04:12:50 +0000
+++ b/src/nsfont.m 2012-08-19 00:53:29 +0000
@@ -270,10 +270,11 @@
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];
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109677: * nsfont.m (ns_ascii_average_width): Ensure the string,
Alp Aker <=