diff --git a/src/pc/network/packets/packet_global_popup.c b/src/pc/network/packets/packet_global_popup.c index 76960b6c..fb305784 100644 --- a/src/pc/network/packets/packet_global_popup.c +++ b/src/pc/network/packets/packet_global_popup.c @@ -7,16 +7,12 @@ void network_send_global_popup(const char* message, int lines) { // get message length u16 messageLength = strlen(message); - // make message mutable - char mutableMessage[messageLength]; - strcpy(mutableMessage, message); - // configure packet struct Packet p = { 0 }; packet_init(&p, PACKET_GLOBAL_POPUP, true, PLMT_NONE); packet_write(&p, &lines, sizeof(int)); packet_write(&p, &messageLength, sizeof(u16)); - packet_write(&p, mutableMessage, messageLength * sizeof(u8)); + packet_write(&p, (char*)message, messageLength * sizeof(u8)); // send the packet network_send(&p); @@ -32,7 +28,7 @@ void network_receive_global_popup(struct Packet* p) { packet_read(p, &lines, sizeof(int)); packet_read(p, &messageLength, sizeof(u16)); if (messageLength >= 255) { messageLength = 255; } - packet_read(p, &message, messageLength * sizeof(u8)); + packet_read(p, message, messageLength * sizeof(u8)); // show popup - djui_popup_create(&message, lines); + djui_popup_create(message, lines); } \ No newline at end of file