fix address sanitizer issues #2

This commit is contained in:
nillerusr
2022-05-01 20:08:32 +03:00
parent ce68fffa3b
commit 61cd8d0afc
27 changed files with 119 additions and 91 deletions
+2 -2
View File
@@ -1788,14 +1788,14 @@ void GLMContext::PreloadTex( CGLMTex *tex, bool force )
0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f };
static int indices[] = { 0, 1, 2 };
static short indices[] = { 0, 1, 2 };
gGL->glEnableVertexAttribArray( 0 );
gGL->glVertexAttribPointer( 0, 3, GL_FLOAT, 0, 0, posns );
gGL->glDrawRangeElements( GL_TRIANGLES, 0, 3, 3, GL_UNSIGNED_INT, indices);
gGL->glDrawRangeElements( GL_TRIANGLES, 0, 2, 3, GL_UNSIGNED_SHORT, indices);
gGL->glDisableVertexAttribArray( 0 );