From d3e1199c8f4d1504b82020a2ff10a3dea01c9d2e Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 8 Apr 2009 04:47:21 +0000 Subject: [PATCH] - Fixed: Not all control paths through DCanvas::ParseDrawTextureTags() called va_end. - Moved the va_copy check out of the non-Win32 part of CMakeLists.txt so that it gets used for MinGW, too. SVN r1527 (trunk) --- src/v_draw.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 63529abc4..33933427c 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -300,12 +300,14 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l if (img == NULL || img->UseType == FTexture::TEX_Null) { + va_end(tags); return false; } // Do some sanity checks on the coordinates. if (x < -16383 || x > 16383 || y < -16383 || y > 16383) { + va_end(tags); return false; } @@ -359,7 +361,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l case TAG_MORE: more_p = va_arg (tags, va_list *); va_end (tags); -#ifdef __GNUC__ +#ifndef NO_VA_COPY va_copy (tags, *more_p); #else tags = *more_p;