Skip to content

Commit b9baf7b

Browse files
committed
make the bot send a short name
1 parent cc434b8 commit b9baf7b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bot.c

+1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ static char * contact_server(int color, char *name)
267267
packet[2]=VERSION_MAJOR;
268268
packet[3]=VERSION_MINOR;
269269
packet[4]=color;
270+
if (l>MAX_NAME_LEN) {l=MAX_NAME_LEN; packet[5+MAX_NAME_LEN]='\0';}
270271
memcpy(packet+5,name,l);
271272

272273
printf("Using name \"%s\".\n", packet+5);

0 commit comments

Comments
 (0)