From 6a529fca4bf1d635e440c4143782cc4317fc494a Mon Sep 17 00:00:00 2001 From: kingscallop <54776947+kingscallop@users.noreply.github.com> Date: Sat, 5 Jun 2021 21:56:00 +0100 Subject: [PATCH] Fix usage of bx::findIdentifierMatch for gl_FragDepth (#2533) When trying to find all the instances of gl_FragDepth and replace them with bgfx_FragDepth it only finds the first instance. --- src/renderer_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 4e6be67e0..a890d7312 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -6199,7 +6199,7 @@ namespace bgfx { namespace gl // Replace all instances of gl_FragDepth with bgfx_FragDepth. for (bx::StringView fragDepth = bx::findIdentifierMatch(temp, "gl_FragDepth") ; !fragDepth.isEmpty() - ; fragDepth = bx::findIdentifierMatch(fragDepth, "gl_FragDepth") + ; fragDepth = bx::findIdentifierMatch(fragDepth.getPtr(), "gl_FragDepth") ) { char* insert = const_cast(fragDepth.getPtr() );