fix string len

This commit is contained in:
2026-02-23 15:56:55 +01:00
parent 1b4bcff757
commit 36142dc0ec

View File

@@ -9,7 +9,7 @@ extern "C" void main() {
unsigned id = sys_getpid(); unsigned id = sys_getpid();
char text[] = "appX"; char text[] = "appX";
text[4] = 0x30+id; text[3] = 0x30+id;
char buf = 32; char buf = 32;
write(1, text, sizeof(text), 0, (int)id); write(1, text, sizeof(text), 0, (int)id);
@@ -20,7 +20,7 @@ extern "C" void main() {
msg[0] = 0x30+cnt; msg[0] = 0x30+cnt;
msg[1] = 0; msg[1] = 0;
cnt=(cnt+1)%10; cnt=(cnt+1)%10;
write(1, msg, sizeof(text), 6, (int)id); write(1, msg, 1, 6, (int)id);
void* ptr= map(512); void* ptr= map(512);
//sprintf(&buf, "ptr address: %x \n" , ptr); //sprintf(&buf, "ptr address: %x \n" , ptr);