Fix Crash

This commit is contained in:
Andrew Pamment 2016-08-08 17:21:04 +10:00
parent 73f9578a25
commit 45be424b8a
2 changed files with 3 additions and 2 deletions

View File

@ -422,7 +422,7 @@ void download(struct user_record *user) {
sqlite3_finalize(res);
sqlite3_close(db);
}
if (sshBBS) {
tcsetattr(STDIN_FILENO, TCSANOW, &oldit);
tcsetattr(STDOUT_FILENO, TCSANOW, &oldot);
@ -746,6 +746,7 @@ int file_menu(struct user_record *user) {
break;
case '}':
{
for (i=user->cur_file_dir;i<conf.file_directory_count;i++) {
if (i + 1 == conf.file_directory_count) {
i = -1;

2
main.c
View File

@ -109,7 +109,7 @@ static int file_sub_handler(void* user, const char* section, const char* name,
int i;
if (strcasecmp(section, "main") == 0) {
if (strcasecmp(name, "visible sec level")) {
if (strcasecmp(name, "visible sec level") == 0) {
fd->sec_level = atoi(value);
}
} else {