mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-04 08:47:11 +00:00
Fix return value from doprnt when message is truncated at non-ASCII character.
src/doprnt.c (doprnt): Don't return value smaller than the buffer size if the message was truncated. (Bug#8545).
This commit is contained in:
parent
b124fd93b0
commit
d178f87164
@ -1,3 +1,8 @@
|
||||
2011-04-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* doprnt.c (doprnt): Don't return value smaller than the buffer
|
||||
size if the message was truncated. (Bug#8545).
|
||||
|
||||
2011-04-28 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* w32fns.c (Fx_change_window_property, Fx_delete_window_property)
|
||||
|
@ -403,7 +403,9 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
|
||||
while (fmt < format_end && --bufsize > 0 && !CHAR_HEAD_P (*fmt));
|
||||
if (!CHAR_HEAD_P (*fmt))
|
||||
{
|
||||
bufptr = save_bufptr;
|
||||
/* Truncate, but return value that will signal to caller
|
||||
that the buffer was too small. */
|
||||
*save_bufptr = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user