comparison config.c @ 816:7ed55a361e79

Use binary mode for reading shaders and config files so we actually get the number of bytes we expect
author Michael Pavone <pavone@retrodev.com>
date Mon, 27 Jul 2015 23:49:14 -0700
parents 0b692b5d154b
children 46bb673eed4e
comparison
equal deleted inserted replaced
815:1f3ddeaacaee 816:7ed55a361e79
89 } 89 }
90 90
91 tern_node * parse_config_file(char * config_path) 91 tern_node * parse_config_file(char * config_path)
92 { 92 {
93 tern_node * ret = NULL; 93 tern_node * ret = NULL;
94 FILE * config_file = fopen(config_path, "r"); 94 FILE * config_file = fopen(config_path, "rb");
95 if (!config_file) { 95 if (!config_file) {
96 goto open_fail; 96 goto open_fail;
97 } 97 }
98 long config_size = file_size(config_file); 98 long config_size = file_size(config_file);
99 if (!config_size) { 99 if (!config_size) {