mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
libicsneoc: Fixed access violation
This commit is contained in:
@@ -486,6 +486,11 @@ bool icsneo_describeDevice(const neodevice_t* device, char* str, size_t* maxLeng
|
||||
if(!icsneo_isValidNeoDevice(device))
|
||||
return false;
|
||||
|
||||
if(!str) {
|
||||
*maxLength = device->device->describe().length();
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string output = device->device->describe();
|
||||
|
||||
*maxLength = output.copy(str, *maxLength);
|
||||
|
||||
Reference in New Issue
Block a user