Skip to content

Commit

Permalink
macOS: Fix sprintf deprecation warning
Browse files Browse the repository at this point in the history
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
  • Loading branch information
akien-mga and bruvzg committed Jan 20, 2023
1 parent a0ddc59 commit a297a69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/osx/joypad_osx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a297a69

Please # to comment.