mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
libartnet: Fix compile with GCC7
error: memset' used with length equal to number of elements without multiplication by element size Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
diff --git a/artnet/transmit.c b/artnet/transmit.c
|
||||
index ce19b11..e882db9 100644
|
||||
--- a/artnet/transmit.c
|
||||
+++ b/artnet/transmit.c
|
||||
@@ -163,7 +163,7 @@ int artnet_tx_tod_data(node n, int id) {
|
||||
bloc = 0;
|
||||
|
||||
while (remaining > 0) {
|
||||
- memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT);
|
||||
+ memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT * sizeof(tod.data.toddata.tod));
|
||||
lim = min(ARTNET_MAX_UID_COUNT, remaining);
|
||||
tod.data.toddata.blockCount = bloc++;
|
||||
tod.data.toddata.uidCount = lim;
|
||||
Reference in New Issue
Block a user