parent
da036de523
commit
9827bf6153
@ -11322,10 +11322,10 @@ int pc_read_motd(void)
|
||||
if( ( fp = fopen(motd_txt, "r") ) != NULL )
|
||||
{
|
||||
unsigned int entries = 0;
|
||||
char buf[CHAT_SIZE_MAX];
|
||||
|
||||
while( entries < MOTD_LINE_SIZE && fgets(motd_text[entries], sizeof(motd_text[entries]), fp) )
|
||||
while( entries < MOTD_LINE_SIZE && fgets(buf, CHAT_SIZE_MAX, fp) )
|
||||
{
|
||||
char* buf = motd_text[entries];
|
||||
unsigned int lines = 0;
|
||||
size_t len;
|
||||
lines++;
|
||||
@ -11344,6 +11344,7 @@ int pc_read_motd(void)
|
||||
buf[0] = ' ';
|
||||
buf[1] = 0;
|
||||
}
|
||||
safestrncpy(motd_text[entries], buf, CHAT_SIZE_MAX);
|
||||
entries++;
|
||||
}
|
||||
fclose(fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user