diff options
Diffstat (limited to 'tests/hello_world_loop.cpp')
-rw-r--r-- | tests/hello_world_loop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/hello_world_loop.cpp b/tests/hello_world_loop.cpp index b9361834..46ec9f23 100644 --- a/tests/hello_world_loop.cpp +++ b/tests/hello_world_loop.cpp @@ -10,7 +10,7 @@ extern "C" { int main() { char *original = (char*)"h e l l o , w o r l d ! "; - char *copy = (char*)malloc(strlen(original)); + char copy[strlen(original)]; for (int i = 0; i < strlen(original); i += 2) { copy[i/2] = original[i]; } |