diff options
| author | jacob1 <jfu614@gmail.com> | 2013-01-06 23:26:38 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-01-06 23:26:38 (GMT) |
| commit | d1abfc313eb3d6508a35cbef458739b4d7c3f857 (patch) | |
| tree | 9dac6a8ba124d916d20635fe8b6b41879ddaea42 /src/graphics | |
| parent | 8e09651990d45d8b25b8795cbd1cfffeecfd3f5f (diff) | |
| download | powder-d1abfc313eb3d6508a35cbef458739b4d7c3f857.zip powder-d1abfc313eb3d6508a35cbef458739b4d7c3f857.tar.gz | |
fix mismatched free()/delete's
Diffstat (limited to 'src/graphics')
| -rw-r--r-- | src/graphics/Graphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp index 974a169..54544d3 100644 --- a/src/graphics/Graphics.cpp +++ b/src/graphics/Graphics.cpp @@ -317,8 +317,8 @@ pixel *Graphics::resample_img(pixel *src, int sw, int sh, int rw, int rh) samples[i] = new float[sourceWidth]; } - unsigned char * resultImage = new unsigned char[resultHeight * resultPitch]; - std::fill(resultImage, resultImage + (resultHeight*resultPitch), 0); + unsigned char * resultImage = (unsigned char*)malloc((resultHeight * resultPitch) * sizeof(unsigned char)); + memset(resultImage, 0, (resultHeight * resultPitch) * sizeof(unsigned char)); //Resample time int resultY = 0; |
