Fixed vsnprintf return value check.

This commit is contained in:
Bill Medland 2001-12-24 20:23:57 +00:00 committed by Alexandre Julliard
parent d3212f9150
commit 7a364bb8aa
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ static char buf[4*1024];
len = vsnprintf(buf, sizeof(buf), format, valist);
va_end(valist);
if (len <= -1) {
if (len <= -1 || len >= sizeof(buf)) {
len = sizeof(buf) - 1;
buf[len] = 0;
buf[len - 1] = buf[len - 2] = buf[len - 3] = '.';