diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-27 08:43:21 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-27 08:43:21 +0200 |
| commit | d7519f338b544624145997576d2800f9670aa699 (patch) | |
| tree | c0e4045729a2017aea1eeb04a27eb8e115a12223 /Private/KernelKit/DebugOutput.hpp | |
| parent | d10241467cc3f77988927a48a4384f63297465dd (diff) | |
MHR-18: Kernel patches, improved documentation and new FloatType in
user-space SystemLib.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit/DebugOutput.hpp')
| -rw-r--r-- | Private/KernelKit/DebugOutput.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Private/KernelKit/DebugOutput.hpp b/Private/KernelKit/DebugOutput.hpp index f24933cc..6c4da58e 100644 --- a/Private/KernelKit/DebugOutput.hpp +++ b/Private/KernelKit/DebugOutput.hpp @@ -57,8 +57,8 @@ inline TerminalDevice carriage_return() { namespace Detail { inline TerminalDevice _write_number(const Long &x, TerminalDevice& term) { - int y = x / 10; - int h = x % 10; + UInt64 y = (x > 0 ? x : -x) / 10; + UInt64 h = (x > 0 ? x : -x) % 10; if (y) _write_number(y, term); @@ -81,8 +81,8 @@ inline TerminalDevice _write_number(const Long &x, TerminalDevice& term) { } inline TerminalDevice _write_number_hex(const Long &x, TerminalDevice& term) { - int y = x / 16; - int h = x % 16; + UInt64 y = (x > 0 ? x : -x) / 16; + UInt64 h = (x > 0 ? x : -x) % 16; if (y) _write_number_hex(y, term); @@ -94,7 +94,7 @@ inline TerminalDevice _write_number_hex(const Long &x, TerminalDevice& term) { if (y < 0) y = -y; - const char NUMBERS[17] = "0123456789"; + const char NUMBERS[17] = "0123456789ABCDEF"; Char buf[2]; buf[0] = NUMBERS[h]; @@ -143,4 +143,3 @@ class DebuggerPortHeader final { #define kcout TerminalDevice::Shared() #define endl end_line() - |
