mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Fix a bug where polling messages would not work properly
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ bool Device::getMessages(std::vector<std::shared_ptr<Message>>& container, size_
|
|||||||
if(limit > (pollingContainer.size_approx() + 4))
|
if(limit > (pollingContainer.size_approx() + 4))
|
||||||
limit = (pollingContainer.size_approx() + 4);
|
limit = (pollingContainer.size_approx() + 4);
|
||||||
|
|
||||||
if(container.capacity() < limit)
|
if(container.size() < limit)
|
||||||
container.resize(limit);
|
container.resize(limit);
|
||||||
|
|
||||||
size_t actuallyRead = pollingContainer.try_dequeue_bulk(container.data(), limit);
|
size_t actuallyRead = pollingContainer.try_dequeue_bulk(container.data(), limit);
|
||||||
|
|||||||
Reference in New Issue
Block a user