]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_sky.c
Q1BSP: fix misaligned memory access
[xonotic/darkplaces.git] / r_sky.c
diff --git a/r_sky.c b/r_sky.c
index 7fd1463dbc7239c60c998ea3124db9ca861234a5..67ece7289ce60c8d8bc4e89f31c0af1114216bce 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -157,7 +157,7 @@ int R_SetSkyBox(const char *sky)
                return false;
        }
 
-       strlcpy(skyname, sky, sizeof(skyname));
+       dp_strlcpy(skyname, sky, sizeof(skyname));
 
        return R_LoadSkyBox();
 }
@@ -432,7 +432,7 @@ void R_Sky(void)
                //GL_Clear(GL_DEPTH_BUFFER_BIT);
        }
        */
-       GL_Scissor(0, 0, r_fb.screentexturewidth, r_fb.screentextureheight);
+       GL_Scissor(r_refdef.view.viewport.x, r_refdef.view.viewport.y, r_refdef.view.viewport.width, r_refdef.view.viewport.height);
 }
 
 //===============================================================