From b9bb14cdc59e6649098450a8d562927635c4e5fb Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 8 Apr 2013 01:33:51 +0100 Subject: [PATCH] Minor VST label fix --- source/backend/plugin/VstPlugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/backend/plugin/VstPlugin.cpp b/source/backend/plugin/VstPlugin.cpp index 02155caff..19bdcefa6 100644 --- a/source/backend/plugin/VstPlugin.cpp +++ b/source/backend/plugin/VstPlugin.cpp @@ -252,10 +252,12 @@ public: CARLA_ASSERT(fEffect != nullptr); CARLA_ASSERT(parameterId < kData->param.count); + strBuf[0] = '\0'; + dispatcher(effGetParamDisplay, parameterId, 0, strBuf, 0.0f); - if (*strBuf == 0) - std::sprintf(strBuf, "%f", getParameterValue(parameterId)); + if (strBuf[0] == '\0') + std::snprintf(strBuf, STR_MAX, "%f", getParameterValue(parameterId)); } void getParameterUnit(const uint32_t parameterId, char* const strBuf)