Commit 1440fe07 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

direct3d11: give enough room for the \0 in the string

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 84fe00e1
...@@ -284,8 +284,8 @@ static HINSTANCE Direct3D11LoadShaderLibrary(void) ...@@ -284,8 +284,8 @@ static HINSTANCE Direct3D11LoadShaderLibrary(void)
HINSTANCE instance = NULL; HINSTANCE instance = NULL;
/* d3dcompiler_47 is the latest on windows 8.1 */ /* d3dcompiler_47 is the latest on windows 8.1 */
for (int i = 47; i > 41; --i) { for (int i = 47; i > 41; --i) {
TCHAR filename[18]; TCHAR filename[19];
_sntprintf(filename, 18, TEXT("D3DCOMPILER_%d.dll"), i); _sntprintf(filename, 19, TEXT("D3DCOMPILER_%d.dll"), i);
instance = LoadLibrary(filename); instance = LoadLibrary(filename);
if (instance) break; if (instance) break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment