likely malloc is an operator new

This commit is contained in:
Joshua Peisach 2023-08-13 19:30:19 -04:00
parent dd318a3295
commit 95bb105817
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A

View File

@ -105,7 +105,7 @@ MxResult MxBitmap::LoadFile(HANDLE p_handle)
ret = ReadFile(p_handle, &hdr, sizeof(hdr), &bytesRead, NULL); ret = ReadFile(p_handle, &hdr, sizeof(hdr), &bytesRead, NULL);
if (ret && (hdr.bfType == g_bitmapSignature)) { if (ret && (hdr.bfType == g_bitmapSignature)) {
this->m_info = (BITMAPINFO*) malloc(1064); this->m_info = new BITMAPINFO;
if(this->m_info) { if(this->m_info) {
ret = ReadFile(p_handle, this->m_info, 1064, &bytesRead, NULL); ret = ReadFile(p_handle, this->m_info, 1064, &bytesRead, NULL);
if (ret && ((this->m_info->bmiHeader).biBitCount == 8)) { if (ret && ((this->m_info->bmiHeader).biBitCount == 8)) {