mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
C Example: Fix improper allocation size
This commit is contained in:
@@ -443,7 +443,7 @@ int main() {
|
|||||||
icsneo_describeDevice(selectedDevice, productDescription, &descriptionLength);
|
icsneo_describeDevice(selectedDevice, productDescription, &descriptionLength);
|
||||||
|
|
||||||
// Prepare the array of neomessage_t ptrs for reading in the messages
|
// Prepare the array of neomessage_t ptrs for reading in the messages
|
||||||
neomessage_t* msgs = (neomessage_t*) malloc(msgLimit * sizeof(neomessage_t*));
|
neomessage_t* msgs = (neomessage_t*) malloc(msgLimit * sizeof(neomessage_t));
|
||||||
|
|
||||||
// Get messages
|
// Get messages
|
||||||
size_t msgCount = msgLimit;
|
size_t msgCount = msgLimit;
|
||||||
|
|||||||
Reference in New Issue
Block a user