aboutsummaryrefslogtreecommitdiff
path: root/src/kern/lib.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2020-12-09 23:15:14 -0700
committerJosh Rahm <joshuarahm@gmail.com>2020-12-09 23:15:14 -0700
commit5f1763ec87503527583cb1a7c6deb73604db0dfc (patch)
tree0892ddf94b614db2d879f7bc993961af5ac25bb2 /src/kern/lib.c
parenta5923b21e48fcfe660c1e7d586fe0c6a5b79e421 (diff)
downloadstm32l4-5f1763ec87503527583cb1a7c6deb73604db0dfc.tar.gz
stm32l4-5f1763ec87503527583cb1a7c6deb73604db0dfc.tar.bz2
stm32l4-5f1763ec87503527583cb1a7c6deb73604db0dfc.zip
Can read from the A/C remote control!test_ir
Diffstat (limited to 'src/kern/lib.c')
-rw-r--r--src/kern/lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kern/lib.c b/src/kern/lib.c
index 24e1658..e0d3e23 100644
--- a/src/kern/lib.c
+++ b/src/kern/lib.c
@@ -37,6 +37,11 @@ void decimalify(int v, char* into)
*into = 0;
return;
} else {
+ if (v < 0) {
+ v = -v;
+ *(into++) = '-';
+ }
+
while (v > 0) {
*(into++) = 0x30 + (v % 10);
v /= 10;