DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 4a4f95fc9f106882c2702fa22c2a574124a3f783
parent dee2b4a8548ce7779d987ab88c2ebb9acbcfa1f1
Author: falkTX <falktx@gmail.com>
Date:   Sun, 26 Aug 2018 09:48:13 +0200

Fix possible undefined variable in NanoVG::textBounds

Diffstat:
Mdgl/src/NanoVG.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp @@ -863,7 +863,7 @@ float NanoVG::textBounds(float x, float y, const char* string, const char* end, if (fContext == nullptr) return 0.0f; DISTRHO_SAFE_ASSERT_RETURN(string != nullptr && string[0] != '\0', 0.0f); - float b[4]; + float b[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; const float ret = nvgTextBounds(fContext, x, y, string, end, b); bounds = Rectangle<float>(b[0], b[1], b[2] - b[0], b[3] - b[1]); return ret;