Skip to content

Commit

Permalink
Fix webui stateChanged message size
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed May 17, 2024
1 parent cab7f3a commit cfd0903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distrho/src/DistrhoUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void UI::stateChanged(const char* const key, const char* const value)
if (char* const msg = static_cast<char*>(std::malloc(msglen)))
{
// TODO escape \\'
std::snprintf(msg, sizeof(msglen) - 1,
std::snprintf(msg, msglen - 1,
"typeof(stateChanged) === 'function' && stateChanged('%s','%s')", key, value);
msg[msglen - 1] = '\0';
webViewEvaluateJS(uiData->webview, msg);
Expand Down

0 comments on commit cfd0903

Please sign in to comment.