Evil: fix evil_format_message()

SVN revision: 75749
This commit is contained in:
Vincent Torri 2012-08-28 06:18:53 +00:00
parent 7322487bd2
commit 54ad1a4c1d
3 changed files with 17 additions and 10 deletions

View File

@ -1,13 +1,11 @@
2012-08-20 Vincent Torri <doursse at users dot sf dot net>
* configure.ac:
quoting.
* src/lib/evil_util.c:
fix evil_format_message(): free the message to display
at the end of the function. Hence the message is displayed,
now.
* Makefile.am:
* src/lib/Makefile.am:
fix distcheck
2012-08-19 Vincent Torri <doursse at users dot sf dot net>
012-08-19 Vincent Torri <doursse at users dot sf dot net>
* configure.ac:
* src/bin/Makefile.am:
@ -43,6 +41,7 @@
* NEWS:
* src/lib/evil_langinfo.c:
Release Version 1.1.0.
Fix nl_langinfo(RADIXCHAR).
2012-04-20 Vincent Torri <doursse at users dot sf dot net>

View File

@ -1,7 +1,12 @@
Evil NEWS - User visible changes.
* Evil 1.7:
** Correctly display messages with evil_format_message()
* Evil 1.1:
** Released April 26th, 2012, by Vincent Torri
** Add evil_path_is_absolute() API
** Add POSIX printf() family functions
** Add S_ISLNK macro

View File

@ -142,11 +142,12 @@ evil_format_message(long err)
str = msg;
#endif /* UNICODE */
LocalFree(msg);
disp = (char *)malloc((strlen(str) + strlen("(00000) ") + 1) * sizeof(char));
if (!disp)
return NULL;
{
LocalFree(msg);
return NULL;
}
snprintf(disp, strlen(str) + strlen("(00000) ") + 1,
"(%5ld) %s", err, str);
@ -155,6 +156,8 @@ evil_format_message(long err)
free(str);
#endif /* UNICODE */
LocalFree(msg);
return disp;
}