[client] egl: fix potential integer underflow

This commit is contained in:
Geoffrey McRae 2023-11-11 11:51:17 +11:00
parent ee5c02f72a
commit 43f9a4c0e1

View file

@ -303,7 +303,9 @@ bool egl_shaderCompile(EGL_Shader * this, const char * vertex_code,
if (!newLine) if (!newLine)
{ {
insertPos = i - 1; insertPos = i;
if (insertPos > 0)
--insertPos;
break; break;
} }
} }