Update OscReceiverInputKey.cpp to remove sprintf warning.

This commit is contained in:
L05
2019-04-12 20:25:18 -07:00
parent b1a1d4e1c3
commit e850b90ccd
@@ -10,7 +10,7 @@ OscReceiverInputKey::OscReceiverInputKey(const FString &address)
_addressName(*address)
{
char buffer[512]; // address truncated after 500 chars.
const auto length = sprintf(buffer, "OSC%.500s", StringCast<ANSICHAR>(*address).Get());
const auto length = sprintf_s(buffer, sizeof(buffer), "OSC%.500s", StringCast<ANSICHAR>(*address).Get());
// replace '/' by '_' because '/' is not a valid FKey character.
for(int i=0; i!=length; ++i)