summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/group.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/toxcore/group.c b/toxcore/group.c
index 96f5ba2f..cd524e4b 100644
--- a/toxcore/group.c
+++ b/toxcore/group.c
@@ -1267,10 +1267,13 @@ static void handle_message_packet_group(Group_Chats *g_c, int groupnumber, const
1267 case PACKET_ID_MESSAGE: { 1267 case PACKET_ID_MESSAGE: {
1268 if (msg_data_len == 0) 1268 if (msg_data_len == 0)
1269 return; 1269 return;
1270 uint8_t newmsg[msg_data_len+1];
1271 memcpy(newmsg, msg_data, msg_data_len);
1272 newmsg[msg_data_len] = 0;
1270 1273
1271 //TODO 1274 //TODO
1272 if (g_c->message_callback) 1275 if (g_c->message_callback)
1273 g_c->message_callback(g_c->m, groupnumber, index, msg_data, msg_data_len, g_c->message_callback_userdata); 1276 g_c->message_callback(g_c->m, groupnumber, index, newmsg, msg_data_len, g_c->message_callback_userdata);
1274 1277
1275 break; 1278 break;
1276 } 1279 }
@@ -1470,4 +1473,4 @@ uint32_t copy_chatlist(const Messenger *m, int *out_list, uint32_t list_size)
1470 1473
1471 return ret; 1474 return ret;
1472} 1475}
1473*/ \ No newline at end of file 1476*/