Commit 72c1a74c authored by Clownacy's avatar Clownacy

Fix invalid vsnprintf buffer size

Was performing a `sizeof` on a pointer, which causes a warning to be
generated.
parent ffb5a995
......@@ -8728,7 +8728,7 @@ MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat
return MA_OUT_OF_MEMORY;
}
length = vsnprintf(pFormattedMessageHeap, sizeof(pFormattedMessageHeap), pFormat, args);
length = vsnprintf(pFormattedMessageHeap, length + 1, pFormat, args);
if (length < 0) {
ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks);
return MA_INVALID_OPERATION;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment