aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-05-21 04:34:13 -0400
committerB. Watson <yalhcru@gmail.com>2021-05-21 04:34:13 -0400
commit5b6f0359338c922f809c5133eb4c7efc61b3f21c (patch)
tree238a3b594e3901e1a9c074eed8620d49740a8122
parenta025fb40fdf3563de0d044fbf0e2598ec5f5b97b (diff)
downloadtaipan-5b6f0359338c922f809c5133eb4c7efc61b3f21c.tar.gz
Save 5 bytes, now 9032
-rw-r--r--taipan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/taipan.c b/taipan.c
index ba5a239..79f97d0 100644
--- a/taipan.c
+++ b/taipan.c
@@ -1567,7 +1567,7 @@ char sea_battle(char id, int num_ships) {
/* TODO: rewrite in asm. Maybe. */
unsigned long get_num(void) {
unsigned char count = 0;
- char input;
+ unsigned char input, i;
SET_HELP(get_amount_help);
while((input = numgetc()) != '\n') {
@@ -1580,7 +1580,6 @@ unsigned long get_num(void) {
return UINT32_MAX;
}
} else if(input == 'k' || input == 'm') {
- char i;
for(i = 0; i < (input == 'k' ? 3 : 6); i++) {
cputc(num_buf[count++] = '0');
if(count >= 10) break;