[vlc-commits] direct3d11: Fix operator precedence

Martin Storsjö git at videolan.org
Mon Dec 17 15:21:11 CET 2018


vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Dec 17 16:20:40 2018 +0200| [0d26efa13d18661a657c0bb8f7b4b6ba64e00866] | committer: Martin Storsjö

direct3d11: Fix operator precedence

This was broken since 1088780784.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0d26efa13d18661a657c0bb8f7b4b6ba64e00866
---

 modules/video_chroma/d3d11_fmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 2710cbe569..815f62b1cf 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -312,7 +312,7 @@ HRESULT D3D11_CreateDevice(vlc_object_t *obj, d3d11_handle_t *hd3d,
         D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1
     };
 
-    for (UINT driver = 0; driver < adapter ? 1 : ARRAY_SIZE(driverAttempts); driver++) {
+    for (UINT driver = 0; driver < (adapter ? 1 : ARRAY_SIZE(driverAttempts)); driver++) {
         hr = D3D11CreateDevice(adapter, adapter ? D3D_DRIVER_TYPE_UNKNOWN : driverAttempts[driver],
                                NULL, creationFlags,
                                D3D11_features, ARRAY_SIZE(D3D11_features), D3D11_SDK_VERSION,



More information about the vlc-commits mailing list