public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e21fe5a
)
hamurabi: input in base 10.
author
Brett Gordon
<beretta42@gmail.com>
Sun, 13 May 2018 03:56:45 +0000
(23:56 -0400)
committer
Brett Gordon
<beretta42@gmail.com>
Sun, 13 May 2018 03:56:45 +0000
(23:56 -0400)
Applications/games/hamurabi.c
patch
|
blob
|
history
diff --git
a/Applications/games/hamurabi.c
b/Applications/games/hamurabi.c
index
1405481
..
1523e32
100644
(file)
--- a/
Applications/games/hamurabi.c
+++ b/
Applications/games/hamurabi.c
@@
-262,7
+262,7
@@
uint16_t input(void) {
if (fgets(input, 16, stdin) == NULL)
exit(EXIT_FAILURE);
errno = 0;
- q = (uint16_t) strtol(input, &endptr, 1
6
);
+ q = (uint16_t) strtol(input, &endptr, 1
0
);
if ((errno == ERANGE && (q == LONG_MAX || q == LONG_MIN))
|| (errno != 0 && q == 0)) {
perror("strtol");