Skip to content

Commit

Permalink
Merge pull request #53 from AddisonG/master
Browse files Browse the repository at this point in the history
Fix compiler warning
  • Loading branch information
Tiiffi authored Feb 12, 2021
2 parents bf11460 + 336f528 commit 29a1c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mcrcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ rc_packet *packet_build(int id, int cmd, char *s1)
packet.size = sizeof(int) * 2 + s1_len + 2;
packet.id = id;
packet.cmd = cmd;
strncpy(packet.data, s1, DATA_BUFFSIZE);
strncpy(packet.data, s1, DATA_BUFFSIZE - 1);

return &packet;
}
Expand Down

0 comments on commit 29a1c99

Please sign in to comment.