* gtools.c (message): Use g_vsnprintf(). Make the "text"

argument constant.
This commit is contained in:
Pavel Roskin 2001-05-14 23:06:43 +00:00
parent f6403d9972
commit 9ad5b2ac54
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-05-14 Pavel Roskin <proski@gnu.org>
* gtools.c (message): Use g_vsnprintf(). Make the "text"
argument constant.
2001-04-30 Pavel Roskin <proski@gnu.org>
* directory.xpm: Remove.

View File

@ -89,7 +89,7 @@ query_dialog (char *header, char *text, int flags, int count, ...)
/* To show nice messages to the users */
Dlg_head *
message (int error, char *header, char *text, ...)
message (int error, char *header, const char *text, ...)
{
va_list args;
char buffer [4096];
@ -98,7 +98,7 @@ message (int error, char *header, char *text, ...)
/* Setup the display information */
strcpy (buffer, "\n");
va_start (args, text);
vsprintf (&buffer [1], text, args);
g_vsnprintf (&buffer [1], sizeof (buffer), text, args);
strcat (buffer, "\n");
va_end (args);