修正sprintf中\0的bug
This commit is contained in:
parent
fa7ca39d52
commit
6b06774072
|
@ -80,7 +80,10 @@ int vprintk(char* out,int limit,const char* fmt,va_list ap){
|
|||
rewid++;
|
||||
}
|
||||
}
|
||||
if(out!=0){printch('\0',s_v,limit_n);rewid++;}
|
||||
if(out!=0){
|
||||
printch('\0',s_v,limit_n);
|
||||
//rewid++;结尾的\0不算在返回值中
|
||||
}
|
||||
return rewid;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue