mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Moved string termination out of main loop
This commit is contained in:
parent
aec1484806
commit
40f91de7a3
@ -116,7 +116,6 @@ prof_run(const int disable_tls, char *log_level, char *account_name)
|
||||
ui_update();
|
||||
}
|
||||
|
||||
inp[size++] = '\0';
|
||||
cmd_result = process_input(inp);
|
||||
}
|
||||
}
|
||||
|
@ -193,6 +193,10 @@ ui_get_char(char *input, int *size)
|
||||
ui_input_nonblocking(FALSE);
|
||||
}
|
||||
|
||||
if (ch == '\n') {
|
||||
input[*size++] = '\0';
|
||||
}
|
||||
|
||||
return (ch != '\n');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user