mirror of
https://agent.ghink.cloud/wb2osz/direwolf
synced 2025-04-04 11:48:30 +00:00
Fix compile warning.
This commit is contained in:
parent
e1e5be36e0
commit
a627abc484
5
external/hidapi/hid.c
vendored
5
external/hidapi/hid.c
vendored
@ -20,6 +20,8 @@
|
||||
https://github.com/libusb/hidapi .
|
||||
********************************************************/
|
||||
|
||||
#include "../../src/direwolf.h" // for strlcpy
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef _NTDEF_
|
||||
@ -465,7 +467,8 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
||||
if (str) {
|
||||
len = strlen(str);
|
||||
cur_dev->path = (char*) calloc(len+1, sizeof(char));
|
||||
strncpy(cur_dev->path, str, len+1);
|
||||
//strncpy(cur_dev->path, str, len+1); // produces warning
|
||||
strlcpy(cur_dev->path, str, len+1);
|
||||
cur_dev->path[len] = '\0';
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user