forked from Mirror/wren
Fix timerGetSource() returning a string without a null terminator
This commit is contained in:
@ -63,6 +63,7 @@ char* timerGetSource()
|
||||
size_t length = strlen(timerLibSource);
|
||||
char* copy = (char*)malloc(length + 1);
|
||||
strncpy(copy, timerLibSource, length);
|
||||
copy[length] = '\0';
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user