> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 08:56:04 up 21:20, 3 users, load average: 0.04, 0.05, 0.08
This commit is contained in:
@ -47,9 +47,12 @@ int vsnprintf(char *out, size_t n, const char *fmt, va_list ap) {
|
||||
|
||||
static int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap) {
|
||||
bool is_fmt;
|
||||
for (is_fmt = false; *fmt && n; fmt ++, *out ++, n --) {
|
||||
for (is_fmt = false; n; fmt ++, out ++, n --) {
|
||||
switch (*fmt)
|
||||
{
|
||||
case '\0':
|
||||
*out = *fmt;
|
||||
goto END;
|
||||
case '%':
|
||||
is_fmt = true;
|
||||
break;
|
||||
@ -77,6 +80,7 @@ static int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
END:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user