Diff between 444af714a21075a47292d077cc566770732158a3 and 48a2c3db1ccff28a615fac56066ca7d721f98d0a
Changed Files
| File | Additions | Deletions | Status |
| mesh/node.c | +2 | -2 | modified |
Full Patch
diff --git a/mesh/node.c b/mesh/node.c
index fc8898c..9ff7419 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -417,7 +417,7 @@ bool node_parse_composition(struct mesh_node *node, uint8_t *data, uint16_t len)
m = *data++;
v = *data++;
- len -= 4;
+ len -= 2;
while (len >= 2 && m--) {
mod_id = get_le16(data);
@@ -691,7 +691,7 @@ bool node_set_model(struct mesh_node *node, uint8_t ele_idx, uint32_t id)
l = g_list_find_custom(ele->models, GUINT_TO_POINTER(id),
match_model_id);
if (l)
- return false;
+ return true;
model = g_malloc0(sizeof(struct mesh_model));
if (!model)