aboutsummaryrefslogtreecommitdiffstats
path: root/code/botlib/be_aas_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/botlib/be_aas_route.c')
-rw-r--r--code/botlib/be_aas_route.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/code/botlib/be_aas_route.c b/code/botlib/be_aas_route.c
index de8cc03..e31202b 100644
--- a/code/botlib/be_aas_route.c
+++ b/code/botlib/be_aas_route.c
@@ -521,7 +521,8 @@ void AAS_CalculateAreaTravelTimes(void)
//
size += settings->numreachableareas * sizeof(unsigned short *);
//
- size += settings->numreachableareas * ALIGN(revreach->numlinks) * sizeof(unsigned short);
+ size += settings->numreachableareas *
+ PAD(revreach->numlinks, sizeof(long)) * sizeof(unsigned short);
} //end for
//allocate memory for the area travel times
ptr = (char *) GetClearedMemory(size);
@@ -541,7 +542,7 @@ void AAS_CalculateAreaTravelTimes(void)
for (l = 0; l < settings->numreachableareas; l++)
{
aasworld.areatraveltimes[i][l] = (unsigned short *) ptr;
- ptr += ALIGN(revreach->numlinks) * sizeof(unsigned short);
+ ptr += PAD(revreach->numlinks, sizeof(long)) * sizeof(unsigned short);
//reachability link
reach = &aasworld.reachability[settings->firstreachablearea + l];
//