Merge pull request #302 from clasher113/main

Batch3D::point() check buffer overflow
This commit is contained in:
MihailRis 2024-09-10 15:09:40 +03:00 committed by GitHub
commit 02677ac8be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -246,6 +246,9 @@ void Batch3D::blockCube(
}
void Batch3D::point(glm::vec3 coord, glm::vec2 uv, glm::vec4 tint) {
if (index + B3D_VERTEX_SIZE >= capacity) {
flush();
}
vertex(coord, uv, tint.r, tint.g, tint.b, tint.a);
}