Author: jtn
Date: Tue Aug  4 11:16:00 2015
New Revision: 29316

URL: http://svn.gna.org/viewcvs/freeciv?rev=29316&view=rev
Log:
Make sure advances[A_FUTURE] is allocated.

See gna bug #23741.

Modified:
    trunk/common/tech.c
    trunk/common/tech.h

Modified: trunk/common/tech.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/tech.c?rev=29316&r1=29315&r2=29316&view=diff
==============================================================================
--- trunk/common/tech.c (original)
+++ trunk/common/tech.c Tue Aug  4 11:16:00 2015
@@ -47,7 +47,7 @@
  * server/ruleset.c (for the server)
  * client/packhand.c (for the client)
  */
-struct advance advances[A_LAST_EXISTING];
+struct advance advances[A_ARRAY_SIZE];
 
 static struct user_flag user_tech_flags[MAX_NUM_USER_TECH_FLAGS];
 

Modified: trunk/common/tech.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/tech.h?rev=29316&r1=29315&r2=29316&view=diff
==============================================================================
--- trunk/common/tech.h (original)
+++ trunk/common/tech.h Tue Aug  4 11:16:00 2015
@@ -44,7 +44,7 @@
 #define A_FIRST 1
 #define A_LAST MAX_NUM_ITEMS /* Used in the network protocol. */
 #define A_FUTURE (A_LAST + 1)
-#define A_LAST_EXISTING A_FUTURE
+#define A_ARRAY_SIZE (A_FUTURE + 1)
 #define A_UNSET (A_LAST + 2)
 #define A_UNKNOWN (A_LAST + 3)
 


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

Reply via email to