Commit 1954fccf authored by Philip Carns's avatar Philip Carns
Browse files

Merge branch 'carns/dev-test-ext-open' into 'master'

error check fopen in test program

See merge request !36
parents 75334c34 84ab66d7
......@@ -13,6 +13,11 @@
char* readfile(const char* filename) {
FILE *f = fopen(filename, "r");
if(!f) {
fprintf(stderr, "\tCould not open json file \"%s\"\n", filename);
fseek(f, 0, SEEK_END);
long fsize = ftell(f);
fseek(f, 0, SEEK_SET);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment