* Check source pointer for a value of NULL rather than another pointer (in the save droid) which we don't use (should cause no difference in execution due to the above memcpy call)

Thanks to Hylke/The_Noid for reporting this.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1594 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-05-06 18:06:51 +00:00
parent 52349eb6cc
commit 58f873acf4
1 changed files with 1 additions and 1 deletions

View File

@ -6087,7 +6087,7 @@ static BOOL buildSaveDroidFromDroid(SAVE_DROID* psSaveDroid, DROID* psCurr, DROI
//version 24 //version 24
psSaveDroid->resistance = psCurr->resistance; psSaveDroid->resistance = psCurr->resistance;
memcpy(&psSaveDroid->sMove, &psCurr->sMove, sizeof(SAVE_MOVE_CONTROL)); memcpy(&psSaveDroid->sMove, &psCurr->sMove, sizeof(SAVE_MOVE_CONTROL));
if (psSaveDroid->sMove.psFormation != NULL) if (psCurr->sMove.psFormation != NULL)
{ {
psSaveDroid->formationDir = psCurr->sMove.psFormation->dir; psSaveDroid->formationDir = psCurr->sMove.psFormation->dir;
psSaveDroid->formationX = psCurr->sMove.psFormation->x; psSaveDroid->formationX = psCurr->sMove.psFormation->x;