]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix crash in rtlights loader when compiled with VS2005 (I forgot that
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 17 Jun 2008 11:09:52 +0000 (11:09 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 17 Jun 2008 11:09:52 +0000 (11:09 +0000)
does use a %s in an sscanf)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8367 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 8c98c5981fcaeebe0f9a9372c1368e994ffc88a8..5c2acfd700dc0f161a2394e4b19221367cf4e9e2 100644 (file)
@@ -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;