From 341de59bb627600c27ef29b113fa71bac120350f Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 9 Aug 2013 20:32:51 -0400 Subject: [PATCH] Fixed possible bug. --- core/Messenger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Messenger.c b/core/Messenger.c index 5f33886f..dd651107 100644 --- a/core/Messenger.c +++ b/core/Messenger.c @@ -389,7 +389,8 @@ static int send_statusmessage(int friendnumber, uint8_t * status, uint16_t lengt static int send_userstatus(int friendnumber, USERSTATUS status) { - return write_cryptpacket_id(friendnumber, PACKET_ID_USERSTATUS, (uint8_t*)&status, sizeof(USERSTATUS)); + uint8_t stat = status; + return write_cryptpacket_id(friendnumber, PACKET_ID_USERSTATUS, &stat, sizeof(stat)); } static int set_friend_statusmessage(int friendnumber, uint8_t * status, uint16_t length)