diff options
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,8 +4,10 @@ static void handle_success(emscripten_fetch_t *fetch) { - printf("Finished downloading %llu bytes of %s from URL %s.\n", - fetch->numBytes, fetch->data, fetch->url); + char data[fetch->numBytes + 1]; + strlcpy(data, fetch->data, fetch->numBytes + 1); + printf("Finished downloading %llu bytes of %s from URL %s.\n", fetch->numBytes, data, + fetch->url); emscripten_fetch_close(fetch); } |