fix mismatched free()/delete's

This commit is contained in:
jacob1 2013-01-06 18:26:38 -05:00
parent 8e09651990
commit d1abfc313e
2 changed files with 3 additions and 3 deletions

View File

@ -286,7 +286,7 @@ std::vector<char> GameSave::Serialise()
int dataSize;
char * data = Serialise(dataSize);
std::vector<char> dataVect(data, data+dataSize);
delete data;
free(data);
return dataVect;
}

View File

@ -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;