wined3d: Fix a sign compare warning in shader_vaddline().

This commit is contained in:
Henri Verbeet 2009-07-08 09:49:29 +02:00 committed by Alexandre Julliard
parent e41831990d
commit 6211643bf5
1 changed files with 2 additions and 3 deletions

View File

@ -159,9 +159,8 @@ int shader_vaddline(SHADER_BUFFER* buffer, const char *format, va_list args)
rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);
if (rc < 0 || /* C89 */
rc > SHADER_PGMSIZE - 1 - buffer->bsize) { /* C99 */
if (rc < 0 /* C89 */ || (unsigned int)rc > SHADER_PGMSIZE - 1 - buffer->bsize /* C99 */)
{
ERR("The buffer allocated for the shader program string "
"is too small at %d bytes.\n", SHADER_PGMSIZE);
buffer->bsize = SHADER_PGMSIZE - 1;