Fix #33411: Smoke simulator using uninitialized noise tile

If loading an existing FFT noise tile failed the tile in memory was left uninitialized.
This commit is contained in:
Miika Hamalainen 2012-12-05 17:58:24 +00:00
parent 2b962212c8
commit 8b477463d1
1 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,8 @@ static void generatTile_FFT(float* const noiseTileData, std::string filename)
for (int x = 0; x < xRes; x++, index++)
noise[index] -= forward[index][0] / totalCells;
// fill noiseTileData
memcpy(noiseTileData, noise, sizeof(float) * totalCells);
// save out the noise tile
saveTile(noise, filename);