xor: fix -x and 0x

fixes #4
This commit is contained in:
Neale Pickett 2021-02-02 19:11:32 -07:00
parent ebc65deac9
commit 0b38368b59
1 changed files with 2 additions and 2 deletions

4
xor.c
View File

@ -10,11 +10,11 @@
#include <unistd.h> #include <unistd.h>
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
int radix = 10; int radix = 0;
int arg; int arg;
int c; int c;
while ((c = getopt(argc, argv, "a")) != -1) { while ((c = getopt(argc, argv, "ax")) != -1) {
switch (c) { switch (c) {
case 'x': case 'x':
radix = 16; radix = 16;