aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-31 10:35:00 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-31 10:35:00 +0100
commit1126a18822701632e5914e441386c7fa5d2cf474 (patch)
tree29891dfbc2e3c35c92402f7b0ed307ceb337de4b
parent47cebef7a2e4dd66be9f7f6b0b8e8cadfeb6064a (diff)
downloadrpi-MMU-example-1126a18822701632e5914e441386c7fa5d2cf474.tar.gz
rpi-MMU-example-1126a18822701632e5914e441386c7fa5d2cf474.zip
fix number to decimal string conversion
-rw-r--r--strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings.c b/strings.c
index 7c87e29..4164467 100644
--- a/strings.c
+++ b/strings.c
@@ -6,7 +6,7 @@ void uint32_to_dec(uint32_t number, char buf[10])
{
for (int i = 0; i < 10; i++)
{
- buf[10 - 1 - i] = number % 10;
+ buf[10 - 1 - i] = '0' + (number % 10);
number /= 10;
}
}