Skip to content

Commit

Permalink
Fix a couple more casts needed in C++.
Browse files Browse the repository at this point in the history
  • Loading branch information
munificent committed Jul 24, 2018
1 parent 03ec257 commit e47f175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/api/resolution.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e47f175

Please sign in to comment.