Code: Select all
void obey_user(){
cprintf("\n%s>", currentDisk);
fgets(lastInput,25,stdin);
if(strcmp(lastInput,"edit")==0){ // i also tried "strncmp(lastInput,"edit",25)" 25 is the maximum length
editor();
}else{
cprintf("\n?");
}
}
Whatever i did it always would print "?".
I also did remove \n from the input using
Code: Select all
lastInput[strcspn(lastInput, "\n")] = '\0';