aboutsummaryrefslogtreecommitdiff
path: root/tests/hello_world_loop.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-16 12:36:12 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-16 14:55:17 -0800
commit086526150c8dc53800a63af9571c62410a161cc6 (patch)
tree8bb70181e105dfda3177cb9ae0cb51272b9bcbfd /tests/hello_world_loop.cpp
parentac78c51c1b9a4b396e28be25b46001672bfae8e5 (diff)
completely automatic malloc inclusion in emcc
Diffstat (limited to 'tests/hello_world_loop.cpp')
-rw-r--r--tests/hello_world_loop.cpp2
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];
}