aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-07-30 12:05:32 +0000
committerKim F. Storm2004-07-30 12:05:32 +0000
commit7c111482b974625610a81b698556a47d8dfa772b (patch)
tree380880b365485c7f0045ce0c2f3376dc389be680 /src
parentee945d083910ee9d0af23008806ba3cf2edcd5b4 (diff)
downloademacs-7c111482b974625610a81b698556a47d8dfa772b.tar.gz
emacs-7c111482b974625610a81b698556a47d8dfa772b.zip
(Fformat): Allocated extra (dummy) element in info.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/editfns.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 282d422beb1..11cc0f7ba89 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12004-07-30 Kim F. Storm <storm@cua.dk>
2
3 * editfns.c (Fformat): Allocate extra (dummy) element in info.
4
12004-07-28 Luc Teirlinck <teirllm@auburn.edu> 52004-07-28 Luc Teirlinck <teirllm@auburn.edu>
2 6
3 * eval.c (Fdefvar, Fdefconst): Doc fixes. 7 * eval.c (Fdefvar, Fdefconst): Doc fixes.
diff --git a/src/editfns.c b/src/editfns.c
index a506c5f4fc8..88a0e63118f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3254,6 +3254,7 @@ usage: (format STRING &rest OBJECTS) */)
3254 /* Piggyback on this loop to initialize precision[N]. */ 3254 /* Piggyback on this loop to initialize precision[N]. */
3255 precision[n] = -1; 3255 precision[n] = -1;
3256 } 3256 }
3257 precision[nargs] = -1;
3257 3258
3258 CHECK_STRING (args[0]); 3259 CHECK_STRING (args[0]);
3259 /* We may have to change "%S" to "%s". */ 3260 /* We may have to change "%S" to "%s". */
@@ -3277,11 +3278,11 @@ usage: (format STRING &rest OBJECTS) */)
3277 3278
3278 /* Allocate the info and discarded tables. */ 3279 /* Allocate the info and discarded tables. */
3279 { 3280 {
3280 int nbytes = nargs * sizeof *info; 3281 int nbytes = (nargs+1) * sizeof *info;
3281 int i; 3282 int i;
3282 info = (struct info *) alloca (nbytes); 3283 info = (struct info *) alloca (nbytes);
3283 bzero (info, nbytes); 3284 bzero (info, nbytes);
3284 for (i = 0; i < nargs; i++) 3285 for (i = 0; i <= nargs; i++)
3285 info[i].start = -1; 3286 info[i].start = -1;
3286 discarded = (char *) alloca (SBYTES (args[0])); 3287 discarded = (char *) alloca (SBYTES (args[0]));
3287 bzero (discarded, SBYTES (args[0])); 3288 bzero (discarded, SBYTES (args[0]));