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>
int main(int argc, char* argv[]) {
int radix = 10;
int radix = 0;
int arg;
int c;
while ((c = getopt(argc, argv, "a")) != -1) {
while ((c = getopt(argc, argv, "ax")) != -1) {
switch (c) {
case 'x':
radix = 16;