From a297a69ac88ea595fa935667f0862ad8852f6109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 20 Jan 2023 11:18:40 +0100 Subject: [PATCH] macOS: Fix sprintf deprecation warning Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com> --- platform/osx/joypad_osx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp index 85148ca84de..d8463469381 100644 --- a/platform/osx/joypad_osx.cpp +++ b/platform/osx/joypad_osx.cpp @@ -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