Trying
This commit is contained in:
parent
b69493904e
commit
132224e588
@ -66,6 +66,11 @@ void process_operations(struct stack* stack) {
|
||||
}
|
||||
} else {
|
||||
char *endptr;
|
||||
if (line[0] == '.')
|
||||
{ printf("bad input\n");
|
||||
return;
|
||||
}
|
||||
|
||||
float val = strtof(line, &endptr);
|
||||
if (endptr == line) {
|
||||
printf("bad input\n");
|
||||
|
Loading…
Reference in New Issue
Block a user