Add cast to test 'string_simple' to avoid C++ compiler error.

This commit is contained in:
Oliver Buchtala 2014-04-23 00:38:45 +02:00
commit 093f8995a8

View file

@ -6,7 +6,7 @@
#include <string.h>
const char* copy_string(const char* str) {
size_t len = strlen(str);
char* newstring = malloc(len + 1);
char* newstring = (char*) malloc(len + 1);
strcpy(newstring, str);
return newstring;
}