Fix a couple more casts needed in C++.

This commit is contained in:
Bob Nystrom
2018-07-24 07:27:18 -07:00
parent 03ec25720d
commit e47f17567e

View File

@ -28,7 +28,7 @@ static char* loadModule(WrenVM* vm, const char* module)
source = "System.print(\"ok\")";
}
char* string = malloc(strlen(source) + 1);
char* string = (char*)malloc(strlen(source) + 1);
strcpy(string, source);
return string;
}
@ -91,7 +91,7 @@ static const char* resolveChange(WrenVM* vm, const char* importer,
{
// Concatenate importer and name.
size_t length = strlen(importer) + 1 + strlen(name) + 1;
char* result = malloc(length);
char* result = (char*)malloc(length);
strcpy(result, importer);
strcat(result, "/");
strcat(result, name);