Browse Source

Fix VST chunk save

Thanks fundamental for spotting it
pull/6/head
falkTX 9 years ago
parent
commit
81529dd0aa
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      distrho/src/DistrhoPluginVST.cpp

+ 5
- 3
distrho/src/DistrhoPluginVST.cpp View File

@@ -340,6 +340,8 @@ public:


intptr_t vst_dispatcher(const int32_t opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) intptr_t vst_dispatcher(const int32_t opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt)
{ {
intptr_t ret = 0;

switch (opcode) switch (opcode)
{ {
case effGetProgram: case effGetProgram:
@@ -512,7 +514,7 @@ public:
{ {
fStateChunk = new char[1]; fStateChunk = new char[1];
fStateChunk[0] = '\0'; fStateChunk[0] = '\0';
return 1;
ret = 1;
} }
else else
{ {
@@ -554,11 +556,11 @@ public:
fStateChunk[i] = '\0'; fStateChunk[i] = '\0';
} }


return chunkSize;
ret = chunkSize;
} }


*(void**)ptr = fStateChunk; *(void**)ptr = fStateChunk;
break;
return ret;


case effSetChunk: case effSetChunk:
{ {


Loading…
Cancel
Save