mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
hidapi/mac: replace sprintf uses with snprintf.
Reference issues:
- https://github.com/libusb/hidapi/pull/509
- https://github.com/libusb/hidapi/pull/511
(cherry picked from commit ae9119c36b)
This commit is contained in:
parent
5f344c17c2
commit
0f2322acfc
1 changed files with 1 additions and 1 deletions
|
|
@ -855,7 +855,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path, int bExclusive)
|
|||
|
||||
/* Create the Run Loop Mode for this device.
|
||||
printing the reference seems to work. */
|
||||
sprintf(str, "HIDAPI_%p", os_dev);
|
||||
snprintf(str, sizeof(str), "HIDAPI_%p", os_dev);
|
||||
dev->run_loop_mode =
|
||||
CFStringCreateWithCString(NULL, str, kCFStringEncodingASCII);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue