nrosenstein-c4d / c4d-resedit

Fork of the official MAXON Cinema 4D ResEdit plugin
Apache License 2.0
2 stars 1 forks source link

Invalid delete [] in TRACE_STRING #5

Closed NiklasRosenstein closed 9 years ago

NiklasRosenstein commented 9 years ago
// globals.cpp
void TRACE_STRING(String str)
{
    Int32 lLen = str.GetCStringLen();
    char* pCh = bNewDeprecatedUseArraysInstead<char>(lLen + 2);
    str.GetCString(pCh, lLen + 1);
    TRACE("%s\n", pCh);
    delete [] pCh;  // <-- should be bDelete(pCh);
}

image