From 36142dc0ec59034bf287cfebdad9f203c03b8f3f Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Mon, 23 Feb 2026 15:56:55 +0100 Subject: [PATCH] fix string len --- user/app1/appl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user/app1/appl.cc b/user/app1/appl.cc index 93bc095..034bd94 100644 --- a/user/app1/appl.cc +++ b/user/app1/appl.cc @@ -8,8 +8,8 @@ extern "C" void main() { //sys_test(1,2,3,4,5); unsigned id = sys_getpid(); - char text[] = "app X"; - text[4] = 0x30+id; + char text[] = "appX"; + text[3] = 0x30+id; char buf = 32; write(1, text, sizeof(text), 0, (int)id); @@ -20,7 +20,7 @@ extern "C" void main() { msg[0] = 0x30+cnt; msg[1] = 0; cnt=(cnt+1)%10; - write(1, msg, sizeof(text), 6, (int)id); + write(1, msg, 1, 6, (int)id); void* ptr= map(512); //sprintf(&buf, "ptr address: %x \n" , ptr);