Mercurial > emacs
comparison src/callint.c @ 46006:6d5d3dd50de6
(Fcall_interactively): When checking to see if doprnt hit
the end of callint_message, allow for a terminating '\0'.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 25 Jun 2002 12:58:54 +0000 |
parents | ce01a38706ee |
children | 1fb8f75062c6 |
comparison
equal
deleted
inserted
replaced
46005:826fff7bded9 | 46006:6d5d3dd50de6 |
---|---|
462 while (1) | 462 while (1) |
463 { | 463 { |
464 int nchars = doprnt (callint_message, callint_message_size, | 464 int nchars = doprnt (callint_message, callint_message_size, |
465 prompt1, (char *)0, | 465 prompt1, (char *)0, |
466 j - 1, (char **) argstrings + 1); | 466 j - 1, (char **) argstrings + 1); |
467 if (nchars < callint_message_size) | 467 if (nchars < callint_message_size - 1) |
468 break; | 468 break; |
469 callint_message_size *= 2; | 469 callint_message_size *= 2; |
470 callint_message | 470 callint_message |
471 = (char *) xrealloc (callint_message, callint_message_size); | 471 = (char *) xrealloc (callint_message, callint_message_size); |
472 } | 472 } |