summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/DebugOutput.hpp
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-04-28 15:13:03 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-04-28 15:13:03 +0000
commit14f10cc0b35155ddb19ec9069ebb884246e61dcf (patch)
treea988617d1c511cf04eb2c2392829a37d82a59e2e /Private/KernelKit/DebugOutput.hpp
parentdb0681412191dcceb5aa99cf31fb8339d6bc4adb (diff)
parent346558208d39a036effe3a4ec232fa5df5a3c8e7 (diff)
Merged in MHR-18 (pull request #8)
MHR-18: A lot of fixes and improvements, mostly related to disk I/O and kernel stability.
Diffstat (limited to 'Private/KernelKit/DebugOutput.hpp')
-rw-r--r--Private/KernelKit/DebugOutput.hpp11
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()
-