C Example: Fix improper allocation size

pull/32/head
Paul Hollinsky 2020-11-17 11:47:05 -05:00
parent ffbb5e20c5
commit cfaf677263
1 changed files with 1 additions and 1 deletions

View File

@ -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;