fix up windows strndup compilation

This commit is contained in:
nick black 2021-07-22 21:09:42 -04:00
parent a26b28e10f
commit 03fbf57f24
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -9,7 +9,7 @@ char* strndup(const char* str, size_t size){
t = size; t = size;
} }
++t; ++t;
char* r = malloc(str); char* r = malloc(t);
if(r){ if(r){
memcpy(r, str, t); memcpy(r, str, t);
r[t] = '\0'; r[t] = '\0';