summaryrefslogtreecommitdiff
path: root/src/kernel/ui/vt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/ui/vt.cpp')
-rw-r--r--src/kernel/ui/vt.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/ui/vt.cpp b/src/kernel/ui/vt.cpp
index 4675cdc..683d484 100644
--- a/src/kernel/ui/vt.cpp
+++ b/src/kernel/ui/vt.cpp
@@ -91,11 +91,15 @@ void vt::writeHex(uint32_t v) {
}
}
-void vt::writeDec(uint32_t v) {
+void vt::writeDec(int v) {
if (v == 0) {
put('0');
return;
}
+ if (v < 0) {
+ put ('-');
+ v = -v;
+ }
char numbers[] = "0123456789";
while (v > 0) {