Check first number.
This commit is contained in:
parent
71aa81ef00
commit
7e2f5a7673
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ int client()
|
||||||
|
|
||||||
if (num_items == 3 && (base(num1) == 0 || base(num2) == 0)) {
|
if (num_items == 3 && (base(num1) == 0 || base(num2) == 0)) {
|
||||||
fprintf(stderr, "base: illegal input");
|
fprintf(stderr, "base: illegal input");
|
||||||
} else if (num_items == 1 && num1 != NULL) {
|
} else if (num_items == 1 && num1 != NULL && base(num1) > 0) {
|
||||||
op = "+";
|
op = "+";
|
||||||
num2 = "0";
|
num2 = "0";
|
||||||
} else if (num_items < 3) {
|
} else if (num_items < 3) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue