Fixed a missing string terminator

This commit is contained in:
2022-08-05 17:14:33 +01:00
parent bfaf4e83bb
commit 577d1965cb
2 changed files with 45 additions and 0 deletions

View File

@@ -55,5 +55,6 @@ Literal _toStringLiteral(char* cstr) {
char* copyString(char* original, int length) {
char* buffer = ALLOCATE(char, length + 1);
strncpy(buffer, original, length);
buffer[length] = '\0';
return buffer;
}