diff --git a/src/wx-glslp-parser.c b/src/wx-glslp-parser.c index dd1fec1..387918a 100644 --- a/src/wx-glslp-parser.c +++ b/src/wx-glslp-parser.c @@ -163,9 +163,9 @@ void get_glslp_name(const char* f, char* s, int size) glslp_t* glslp_parse(const char* f) { int i, j, len, sublen; - char s[512], t[512], z[512]; + char s[512], t[512], z[540]; - s[511] = 0; + memset(s, 0, sizeof(s)); if (endswith(f, ".glsl")) return glsl_parse(f); diff --git a/src/wx-glslp-parser.h b/src/wx-glslp-parser.h index 59ae315..970eb35 100644 --- a/src/wx-glslp-parser.h +++ b/src/wx-glslp-parser.h @@ -22,7 +22,7 @@ struct texture { }; struct shader { - char shader_fn[512]; + char shader_fn[1024]; char* shader_program; char alias[64]; int filter_linear; diff --git a/src/wx-sdl2-video-gl3.c b/src/wx-sdl2-video-gl3.c index f8895b3..3ce76e1 100644 --- a/src/wx-sdl2-video-gl3.c +++ b/src/wx-sdl2-video-gl3.c @@ -559,7 +559,7 @@ static glsl_t* load_glslp(glsl_t* glsl, int num_shader, const char* f) if (p) { char path[512]; - char file[512]; + char file[1024]; int failed = 0; strcpy(path, f); char* filename = get_filename(path); diff --git a/src/wx-sdl2.c b/src/wx-sdl2.c index d230416..aedfb44 100644 --- a/src/wx-sdl2.c +++ b/src/wx-sdl2.c @@ -504,7 +504,7 @@ int pc_main(int argc, char** argv) paths_init(); #ifdef __linux__ - char s[512]; + char s[1024]; /* create directories if they don't exist */ if (!wx_setup(pcem_path)) return FALSE;