scanf segfaults and various other anomalies inside while loop
- by Shadow
while(1){
//Command prompt
char *command;
printf("%s>",current_working_directory);
scanf("%s",command);<--seg faults after input has been received.
printf("\ncommand:%s\n",command);
}
I am getting a few different errors and they don't really seem reproducible(except for the segfault at this point .<). This code worked…