Bad input fix
This commit is contained in:
parent
2ff0fd0ddf
commit
b69493904e
@ -68,7 +68,7 @@ void process_operations(struct stack* stack) {
|
|||||||
char *endptr;
|
char *endptr;
|
||||||
float val = strtof(line, &endptr);
|
float val = strtof(line, &endptr);
|
||||||
if (endptr == line) {
|
if (endptr == line) {
|
||||||
printf("no input\n");
|
printf("bad input\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
push_stack(stack, val);
|
push_stack(stack, val);
|
||||||
|
Loading…
Reference in New Issue
Block a user