//End of list?
case 'E':
if (!str_cmp (word, "End"))
{
//Add the account to the end of the list
sprintf(buf2, "%s\r\nAcc %s %s\r\nEnd\r\n", buf2, ch->name, arg2);
fclose(fp);
//Reopen as blank and write full file with buf2
sprintf(buf, "%saccount_list.txt", ACCOUNT_DIR);
if ((fp = fopen (buf, "w+")) == NULL)
{
send_to_char("The account list is missing, please inform an administrator\r\n", ch);
bug ("Account list not found.", 0);
return;
}
fprintf(fp, buf2);
fclose(fp);
char buf[MSL *5];
char buf2[MSL *5];
int x = fgetc(stream);
if (x == EOF) {
cut_end_of_file_warning();
return;
}
Our account information is stored in an accounts_list.txt, and whenever someone tries to add to it, the MUD is crashing (but oddly enough, not creating a coredump).
Checking the logs, the last error is on BUG: Fread_word: word too long.
Then you check both the accounts_list.txt and the account file itself (again, another .txt file), the last entries aren't saving right (truncated, or a line break missing, etc).
I'm thinking that maybe the accounts file has exceeded the MAX_INPUT_LENGTH.
Does this seem right?
Would I be able to increase the MAX_INPUT_LENGTH safely without messing anything else up?