diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-15 19:51:21 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-16 21:23:02 +0100 |
commit | 4dcdc715910b61a2b58f1ea8ae5f86d041e3c229 (patch) | |
tree | c79b58668f4f35861dc902e6a5eccfce7a225497 /src/main.c | |
parent | c095a0ef0c585dbb64b0ecf8a148a50918f83474 (diff) |
Don't use variable-length arrays
They're not supported by MSVC.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -28,13 +28,14 @@ int main(int argc, char *argv[]) { int i, numfps = 0; bool ast = false; - int files[argc]; + int *files; unsigned char buffer[4096]; cmark_doc_parser *parser; size_t offset; node_block *document; parser = cmark_new_doc_parser(); + files = (int *)malloc(argc * sizeof(*files)); for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--version") == 0) { @@ -99,5 +100,7 @@ int main(int argc, char *argv[]) cmark_free_blocks(document); end_timer("free_blocks"); + free(files); + return 0; } |