mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-22 03:15:01 +00:00
vsnprintf implementation
This commit is contained in:
parent
2d4d39c54b
commit
675193fec3
4 changed files with 12 additions and 1 deletions
|
@ -56,7 +56,7 @@
|
|||
#include <cstdbool>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include <string>
|
||||
#include "va_ctx.h"
|
||||
|
||||
namespace Emulator::HLE::Libraries::LibC {
|
||||
|
@ -693,4 +693,10 @@ static int printf_ctx(VaCtx* ctx) {
|
|||
return result;
|
||||
}
|
||||
|
||||
static int vsnprintf_ctx(char* s, size_t n, const char* format, VaList* arg) {
|
||||
char buffer[n];
|
||||
int result = _vsnprintf(_out_buffer, buffer, format, arg);
|
||||
std::strcpy(s, buffer);
|
||||
return result;
|
||||
}
|
||||
} // namespace Emulator::HLE::Libraries::LibC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue