aboutsummaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rw-r--r--usr/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/main.c b/usr/main.c
index 7091580..3543c31 100644
--- a/usr/main.c
+++ b/usr/main.c
@@ -5,7 +5,7 @@ char* ulong_to_string(unsigned long value, char* data)
{
unsigned long t = value;
unsigned long c;
- char* dptr = data + 9;
+ char* dptr = data + 10;
for (int i = 0; i <= 10; i++) {
c = t%10;
*dptr = 0x30 + (c&0xF);
@@ -13,6 +13,10 @@ char* ulong_to_string(unsigned long value, char* data)
if (t==0)
break;
dptr -= 1;
+ if (i == 5) {
+ *dptr = '.';
+ dptr -= 1;
+ }
}
return dptr;
}