juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.64k stars 1.75k forks source link

OSC String argument that are not plain ASCII are not correctly padded #546

Open beschulz opened 5 years ago

beschulz commented 5 years ago

@julianstorer The number of padding zeros is incorrectly computed when string is not plain ASCII: https://github.com/WeAreROLI/JUCE/blob/77e93e35e4057f5ce08d352f56762be271dcd482/modules/juce_osc/osc/juce_OSCSender.cpp#L72

Fix is easy! Use value.getNumBytesAsUTF8() instead of value.length()!

this bug is in master and develop and is agnostic of platform and os.

Reproduction:

Expected behaviour:

Observed behaviour:

beschulz commented 5 years ago

@tpoole : this is fixed - thanks!