From: havoc Date: Sat, 4 Mar 2006 02:45:32 +0000 (+0000) Subject: fix a C99 lazy variable issue with non-C99 compilers X-Git-Tag: xonotic-v0.1.0preview~4262 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e5e0fcdb11769d2ffba05ea7c500376fa9564642;p=xonotic%2Fdarkplaces.git fix a C99 lazy variable issue with non-C99 compilers git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6052 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index d6b8a8b1..35b7379f 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -459,15 +459,15 @@ const char *builtinshader_light_frag = int R_Shadow_CompileShaderPermutation(int permutation) { - if (r_shadow_program_compiledlight[permutation]) - return r_shadow_program_light[permutation]; - r_shadow_program_compiledlight[permutation] = true; char *vertstring, *fragstring; int vertstrings_count; int fragstrings_count; const char *vertstrings_list[SHADERPERMUTATION_COUNT+1]; const char *fragstrings_list[SHADERPERMUTATION_COUNT+1]; char permutationname[256]; + if (r_shadow_program_compiledlight[permutation]) + return r_shadow_program_light[permutation]; + r_shadow_program_compiledlight[permutation] = true; vertstring = (char *)FS_LoadFile("glsl/light.vert", tempmempool, false, NULL); fragstring = (char *)FS_LoadFile("glsl/light.frag", tempmempool, false, NULL); vertstrings_count = 0;