UFO:Alien Invasion
Development => Coding => Topic started by: oeystein on July 16, 2007, 10:15:55 am
-
In net.c the following is declared:
const char * stream_peer_name (struct net_stream *s, char *dst, int len)
{
if (!s)
return "(null)";
else if (stream_is_loopback(s))
return "loopback connection";
else {
char buf[s->addrlen];
void *src;
As you can see, there is an attempt to dynamically initialize the size of array buf based on the variable s->addrlen. Is this standard C? It wont compile in VS2005.
-
no, this should not be allowed in c89 or c99 - i will look that up and fix it
-
IMO C99 allows that.