Fix an ANSI C incompatibility.

This commit is contained in:
Clownacy
2022-08-04 10:01:49 +01:00
committed by David Reid
parent 2fde0c695e
commit 2f0d8a4fa8
+5 -2
View File
@@ -12270,12 +12270,15 @@ MA_API int ma_strappend(char* dst, size_t dstSize, const char* srcA, const char*
MA_API char* ma_copy_string(const char* src, const ma_allocation_callbacks* pAllocationCallbacks)
{
size_t sz;
char* dst;
if (src == NULL) {
return NULL;
}
size_t sz = strlen(src)+1;
char* dst = (char*)ma_malloc(sz, pAllocationCallbacks);
sz = strlen(src)+1;
dst = (char*)ma_malloc(sz, pAllocationCallbacks);
if (dst == NULL) {
return NULL;
}