From: havoc Date: Tue, 17 Jun 2008 11:09:52 +0000 (+0000) Subject: fix crash in rtlights loader when compiled with VS2005 (I forgot that X-Git-Tag: xonotic-v0.1.0preview~2207 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9cf7fb8ac0964e77ab862231b61a7b321f9f66bd;p=xonotic%2Fdarkplaces.git fix crash in rtlights loader when compiled with VS2005 (I forgot that does use a %s in an sscanf) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8367 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index 8c98c598..5c2acfd7 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -3646,7 +3646,11 @@ void R_Shadow_LoadWorldLights(void) #if _MSC_VER >= 1400 #define sscanf sscanf_s #endif - a = sscanf(t, "%f %f %f %f %f %f %f %d %s %f %f %f %f %f %f %f %f %i", &origin[0], &origin[1], &origin[2], &radius, &color[0], &color[1], &color[2], &style, cubemapname, &corona, &angles[0], &angles[1], &angles[2], &coronasizescale, &ambientscale, &diffusescale, &specularscale, &flags); + a = sscanf(t, "%f %f %f %f %f %f %f %d %s %f %f %f %f %f %f %f %f %i", &origin[0], &origin[1], &origin[2], &radius, &color[0], &color[1], &color[2], &style, cubemapname +#if _MSC_VER >= 1400 +, sizeof(cubemapname) +#endif +, &corona, &angles[0], &angles[1], &angles[2], &coronasizescale, &ambientscale, &diffusescale, &specularscale, &flags); *s = tempchar; if (a < 18) flags = LIGHTFLAG_REALTIMEMODE;