mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
fix up windows strndup compilation
This commit is contained in:
parent
a26b28e10f
commit
03fbf57f24
@ -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';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user