diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 10:35:00 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 10:35:00 +0100 |
commit | 1126a18822701632e5914e441386c7fa5d2cf474 (patch) | |
tree | 29891dfbc2e3c35c92402f7b0ed307ceb337de4b | |
parent | 47cebef7a2e4dd66be9f7f6b0b8e8cadfeb6064a (diff) | |
download | rpi-MMU-example-1126a18822701632e5914e441386c7fa5d2cf474.tar.gz rpi-MMU-example-1126a18822701632e5914e441386c7fa5d2cf474.zip |
fix number to decimal string conversion
-rw-r--r-- | strings.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } } |