Skip to content

Commit

Permalink
fix Windows driver snprintf bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxianyu committed Jul 5, 2023
1 parent 9e421b4 commit 8ecdeef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client-drv/client-drv/lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
EXTERN_C_START

// for nlohmann::json
// wrapper for RtlStringCchPrintfA
// wrapper for _vsnprintf
int snprintf(char *s, size_t n, const char *format, ...) {
int ret;
va_list arg;
va_start(arg, format);
ret = RtlStringCchPrintfA(s, n, format, arg);
ret = _vsnprintf(s, n, format, arg);
va_end(arg);
return ret;
}
Expand Down

0 comments on commit 8ecdeef

Please sign in to comment.