File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1081,7 +1081,7 @@ int HID_API_EXPORT_CALL HID_API_CALL hid_get_manufacturer_string(hid_device *dev
1081
1081
}
1082
1082
1083
1083
wcsncpy (string , dev -> device_info -> manufacturer_string , maxlen );
1084
- string [maxlen ] = L'\0' ;
1084
+ string [maxlen - 1 ] = L'\0' ;
1085
1085
1086
1086
return 0 ;
1087
1087
}
@@ -1102,7 +1102,7 @@ int HID_API_EXPORT_CALL HID_API_CALL hid_get_product_string(hid_device *dev, wch
1102
1102
1103
1103
1104
1104
wcsncpy (string , dev -> device_info -> product_string , maxlen );
1105
- string [maxlen ] = L'\0' ;
1105
+ string [maxlen - 1 ] = L'\0' ;
1106
1106
1107
1107
return 0 ;
1108
1108
}
@@ -1123,7 +1123,7 @@ int HID_API_EXPORT_CALL HID_API_CALL hid_get_serial_number_string(hid_device *de
1123
1123
1124
1124
1125
1125
wcsncpy (string , dev -> device_info -> serial_number , maxlen );
1126
- string [maxlen ] = L'\0' ;
1126
+ string [maxlen - 1 ] = L'\0' ;
1127
1127
1128
1128
return 0 ;
1129
1129
}
You can’t perform that action at this time.
0 commit comments