diff options
author | rubidium <rubidium@openttd.org> | 2013-11-22 21:50:43 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-22 21:50:43 +0000 |
commit | 2e54c8fdfa237f84e8d48b30bf4811ba7ed84327 (patch) | |
tree | 7ce2441341e514ccc4225d692f5c8d64b881e75c /src/tgp.cpp | |
parent | bdd62a4b3e3df6282122a7c4353e6fef632f9c32 (diff) | |
download | openttd-2e54c8fdfa237f84e8d48b30bf4811ba7ed84327.tar.xz |
(svn r26056) -Fix: a number of possibly uninitialised variables
Diffstat (limited to 'src/tgp.cpp')
-rw-r--r-- | src/tgp.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp index 4cbde2d82..1fb3485ec 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -560,11 +560,12 @@ static const control_point_list_t _curve_maps[] = { static void HeightMapCurves(uint level) { height_t ht[lengthof(_curve_maps)]; + MemSetT(ht, 0, lengthof(ht)); /* Set up a grid to choose curve maps based on location */ uint sx = Clamp(1 << level, 2, 32); uint sy = Clamp(1 << level, 2, 32); - byte *c = (byte *)alloca(sx * sy); + byte *c = AllocaM(byte, sx * sy); for (uint i = 0; i < sx * sy; i++) { c[i] = Random() % lengthof(_curve_maps); |