fix string len
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user