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