about summary refs log tree commit diff
path: root/mgenmid.c
diff options
context:
space:
mode:
Diffstat (limited to 'mgenmid.c')
-rw-r--r--mgenmid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mgenmid.c b/mgenmid.c
index 36aa8c8..655df95 100644
--- a/mgenmid.c
+++ b/mgenmid.c
@@ -21,9 +21,10 @@ printb36(uint64_t x)
 
 	char outbuf[16];
 	char *o = outbuf + sizeof outbuf;
-	*o = 0;
 
+	*--o = 0;
 	do { *--o = base36[x % 36]; } while (x /= 36);
+
 	fputs(o, stdout);
 }