Skip to content

Commit

Permalink
fix #4907:
Browse files Browse the repository at this point in the history
integer SIGFPE in AAI
  • Loading branch information
abma committed Jul 20, 2015
1 parent 69eea1b commit 830e2a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AI/Skirmish/AAI/AAIMap.cpp
Expand Up @@ -1991,7 +1991,7 @@ void AAIMap::SearchMetalSpots()
}
for (int i = 0; i != TotalCells; i++) // this will get the total metal a mex placed at each spot would make
{
MexArrayB[i] = TempAverage[i] * 255 / MaxMetal; //scale the metal so any map will have values 0-255, no matter how much metal it has
MexArrayB[i] = SafeDivide(TempAverage[i] * 255, MaxMetal); //scale the metal so any map will have values 0-255, no matter how much metal it has
}


Expand Down Expand Up @@ -2080,7 +2080,7 @@ void AAIMap::SearchMetalSpots()
}
}
}
MexArrayB[y * MetalMapWidth + x] = TotalMetal * 255 / MaxMetal;; //set that spots metal amount
MexArrayB[y * MetalMapWidth + x] = SafeDivide(TotalMetal * 255, MaxMetal); //set that spots metal amount
}
}
}
Expand Down

0 comments on commit 830e2a6

Please sign in to comment.