- 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)
This commit is contained in:
Randy Heit 2009-04-08 04:47:21 +00:00
parent 2ac649e09d
commit d3e1199c8f

View file

@ -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) if (img == NULL || img->UseType == FTexture::TEX_Null)
{ {
va_end(tags);
return false; return false;
} }
// Do some sanity checks on the coordinates. // Do some sanity checks on the coordinates.
if (x < -16383 || x > 16383 || y < -16383 || y > 16383) if (x < -16383 || x > 16383 || y < -16383 || y > 16383)
{ {
va_end(tags);
return false; return false;
} }
@ -359,7 +361,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
case TAG_MORE: case TAG_MORE:
more_p = va_arg (tags, va_list *); more_p = va_arg (tags, va_list *);
va_end (tags); va_end (tags);
#ifdef __GNUC__ #ifndef NO_VA_COPY
va_copy (tags, *more_p); va_copy (tags, *more_p);
#else #else
tags = *more_p; tags = *more_p;