Author: jtn
Date: Tue Aug  4 11:16:46 2015
New Revision: 29318

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

See gna bug #23741.

Modified:
    branches/S2_6/common/tech.c
    branches/S2_6/common/tech.h

Modified: branches/S2_6/common/tech.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/tech.c?rev=29318&r1=29317&r2=29318&view=diff
==============================================================================
--- branches/S2_6/common/tech.c (original)
+++ branches/S2_6/common/tech.c Tue Aug  4 11:16:46 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: branches/S2_6/common/tech.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/tech.h?rev=29318&r1=29317&r2=29318&view=diff
==============================================================================
--- branches/S2_6/common/tech.h (original)
+++ branches/S2_6/common/tech.h Tue Aug  4 11:16:46 2015
@@ -43,7 +43,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