<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39328 >
The current code is clearly wrong. The va_arg may be implemented as a
pointer rather than an inline array and so passing it multiple times to
vsnprintf will generate garbage results on some platforms while working
Nothing I've read indicates that va_start can be called multiple times
within the same function, though. If this is not guaranteed it is
possible there is some platform that does not support it. The
alternative is to use va_copy (a C99 add-on); however, since I notice we
already use duplicate va_start calls elsewhere we might as well keep it
like that for now.
So I'm applying the patch as-is.
Freeciv-dev mailing list