<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
on others.

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.

-jason


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to