1
0
forked from Mirror/wren

Fix timerGetSource() returning a string without a null terminator

This commit is contained in:
Rohan Singh
2015-08-13 01:50:21 -04:00
parent cd5087d222
commit 0efb943173

View File

@ -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;
}