Skip to content

Commit

Permalink
Merge pull request #4867 from dodomorandi/fix-gasgiant-ub
Browse files Browse the repository at this point in the history
Fix UB related to allocation/free mismatch
  • Loading branch information
fluffyfreak authored Apr 27, 2020
2 parents 8c1a495 + d9328f1 commit a736e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GasGiant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void GasGiant::GenerateTexture()
const double fracStep = 1.0 / double(s_texture_size_small - 1);

Graphics::TextureCubeData tcd;
std::unique_ptr<Color> bufs[NUM_PATCHES];
std::unique_ptr<Color[]> bufs[NUM_PATCHES];
for (int i = 0; i < NUM_PATCHES; i++) {
Color *colors = new Color[(s_texture_size_small * s_texture_size_small)];
for (Uint32 v = 0; v < s_texture_size_small; v++) {
Expand Down

0 comments on commit a736e77

Please sign in to comment.