aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-01-23 12:04:35 +0530
committerBobby <[email protected]>2026-01-23 12:04:35 +0530
commit92d6aacc663d28c5d1ea4a733b5a7cc94cc6eb36 (patch)
tree0905249cd41c619cda4152c487ed9acee3a53f26 /system
parent414025581f51f9705caa3e6c0f3e4ce4e0e32416 (diff)
downloadakiba-92d6aacc663d28c5d1ea4a733b5a7cc94cc6eb36.tar.xz
akiba-92d6aacc663d28c5d1ea4a733b5a7cc94cc6eb36.zip
fix keypresses not appearing on terminal in ash
Diffstat (limited to 'system')
-rw-r--r--system/ash/ash.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/ash/ash.zig b/system/ash/ash.zig
index 577dea3..5d6a600 100644
--- a/system/ash/ash.zig
+++ b/system/ash/ash.zig
@@ -5,6 +5,7 @@ const akiba = @import("akiba");
const MAX_INPUT = 256;
var input_buffer: [MAX_INPUT]u8 = undefined;
var input_len: usize = 0;
+var char_buffer: [1]u8 = undefined; // Static buffer for single char echoing
export fn _start() noreturn {
while (true) {
@@ -30,8 +31,8 @@ export fn _start() noreturn {
input_buffer[input_len] = char;
input_len += 1;
// Echo character to screen
- const char_str = [_]u8{char};
- akiba.io.print(&char_str) catch {};
+ char_buffer[0] = char;
+ akiba.io.print(&char_buffer) catch {};
}
}