Browse Source

msvc: prefer malloc to alloca

pull/278/head
Jean Pierre Cimalando 4 years ago
parent
commit
fb72b8610b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      distrho/src/DistrhoUILV2.cpp

+ 4
- 1
distrho/src/DistrhoUILV2.cpp View File

@@ -289,7 +289,7 @@ protected:

// reserve atom space
const size_t atomSize = sizeof(LV2_Atom) + msgSize;
char* atomBuf = (char*)alloca(atomSize);
char* atomBuf = (char*)malloc(atomSize);
std::memset(atomBuf, 0, atomSize);

// set atom info
@@ -302,6 +302,9 @@ protected:

// send to DSP side
fWriteFunction(fController, eventInPortIndex, atomSize, fURIDs.atomEventTransfer, atom);

// free atom space
free(atomBuf);
}

#if DISTRHO_PLUGIN_WANT_MIDI_INPUT


Loading…
Cancel
Save