Small fix for WIN32

This commit is contained in:
CK Tan 2018-01-04 03:18:08 -08:00
parent 95ee4414f6
commit 624013252b
1 changed files with 1 additions and 1 deletions

2
toml.c
View File

@ -37,7 +37,7 @@ SOFTWARE.
char* strndup(const char* s, size_t n) char* strndup(const char* s, size_t n)
{ {
size_t len = strnlen(s, n); size_t len = strnlen(s, n);
char* p = malloc(s, len+1); char* p = malloc(len+1);
if (p) { if (p) {
memcpy(p, s, len); memcpy(p, s, len);
p[len] = 0; p[len] = 0;