1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

macOS: Fix sprintf deprecation warning

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
(cherry picked from commit a297a69ac8)
This commit is contained in:
Rémi Verschelde
2023-01-20 11:18:40 +01:00
parent 34234f9d97
commit 88381221f2

View File

@@ -323,7 +323,7 @@ bool JoypadOSX::configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy) {
if (vendor && product_id) {
char uid[128];
sprintf(uid, "%08x%08x%08x%08x", OSSwapHostToBigInt32(3), OSSwapHostToBigInt32(vendor), OSSwapHostToBigInt32(product_id), OSSwapHostToBigInt32(version));
snprintf(uid, 128, "%08x%08x%08x%08x", OSSwapHostToBigInt32(3), OSSwapHostToBigInt32(vendor), OSSwapHostToBigInt32(product_id), OSSwapHostToBigInt32(version));
input->joy_connection_changed(id, true, name, uid);
} else {
//bluetooth device