From 2e13ec5ff1ed143e3087adff3841cea1bf905466 Mon Sep 17 00:00:00 2001 From: janwas Date: Thu, 10 Mar 2005 00:47:23 +0000 Subject: [PATCH] fix stupid sizeof bug reported by philip This was SVN commit r1981. --- source/lib/sysdep/win/wdetect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/sysdep/win/wdetect.cpp b/source/lib/sysdep/win/wdetect.cpp index f634c4fe0d..6ed14c224a 100755 --- a/source/lib/sysdep/win/wdetect.cpp +++ b/source/lib/sysdep/win/wdetect.cpp @@ -215,7 +215,7 @@ static int get_ogl_drv_name(char* ogl_drv_name, const size_t max_name_len) // add .dll to filename, if not already there char* ext = strrchr(ogl_drv_name, '.'); if(!ext || stricmp(ext, ".dll") != 0) - strcat_s(ogl_drv_name, sizeof(ogl_drv_name), ".dll"); + strcat_s(ogl_drv_name, max_name_len, ".dll"); ret = 0; // success }