mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-15 15:37:51 -04:00
Small improvement in handling of the input
This commit is contained in:
parent
2df7dac536
commit
e0c17d79a1
@ -119,13 +119,13 @@ void pwd_command(const std::vector<std::string>&){
|
||||
int main(){
|
||||
get_console_information();
|
||||
|
||||
char input_buffer[64];
|
||||
char input_buffer[128];
|
||||
std::string current_input;
|
||||
|
||||
print("thor> ");
|
||||
|
||||
while(true){
|
||||
print("thor> ");
|
||||
|
||||
auto c = read_input(input_buffer, 63);
|
||||
auto c = read_input(input_buffer, 127);
|
||||
|
||||
if(input_buffer[c-1] == '\n'){
|
||||
if(c > 1){
|
||||
@ -174,6 +174,8 @@ int main(){
|
||||
}
|
||||
|
||||
current_input.clear();
|
||||
|
||||
print("thor> ");
|
||||
} else {
|
||||
input_buffer[c] = '\0';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user