1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

add strncpy fix

This commit is contained in:
FunkyFr3sh 2024-12-10 20:52:36 +01:00
parent 31b8d0aff8
commit 0843d5b9fc

View File

@ -255,6 +255,7 @@ static void ogl_build_programs()
{
char shader_path_tmp[MAX_PATH] = { 0 };
strncpy(shader_path_tmp, shader_path, sizeof(shader_path_tmp));
shader_path[sizeof(shader_path_tmp) - 1] = '\0'; /* strncpy fix */
if (strlen(shader_path_tmp) <= sizeof(shader_path_tmp) - 8)
{