Small fix for WIN32
This commit is contained in:
parent
95ee4414f6
commit
624013252b
1 changed files with 1 additions and 1 deletions
2
toml.c
2
toml.c
|
@ -37,7 +37,7 @@ SOFTWARE.
|
|||
char* strndup(const char* s, size_t n)
|
||||
{
|
||||
size_t len = strnlen(s, n);
|
||||
char* p = malloc(s, len+1);
|
||||
char* p = malloc(len+1);
|
||||
if (p) {
|
||||
memcpy(p, s, len);
|
||||
p[len] = 0;
|
||||
|
|
Loading…
Reference in a new issue