aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2025-12-13 16:11:06 +0100
committerAndre Weissflog <floooh@gmail.com>2025-12-13 16:11:06 +0100
commit33e2271c431bf21de001e972f72da17a984da932 (patch)
treef858b83db6f2612da9fe32b0c354b96556a91784
parente0832c96e4bbc760fa8461a7e63155fda7b00b91 (diff)
sokol_gfx.h: fix gap in assert check (fixes #1406)
-rw-r--r--sokol_gfx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index b78e6999..947397ac 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -8144,7 +8144,7 @@ _SOKOL_PRIVATE void _sg_pipeline_common_init(_sg_pipeline_common_t* cmn, const s
for (size_t attr_idx = 0; attr_idx < SG_MAX_VERTEX_ATTRIBUTES; attr_idx++) {
const sg_vertex_attr_state* attr_state = &desc->layout.attrs[attr_idx];
if (attr_state->format != SG_VERTEXFORMAT_INVALID) {
- SOKOL_ASSERT(attr_state->buffer_index < SG_MAX_VERTEXBUFFER_BINDSLOTS);
+ SOKOL_ASSERT((attr_state->buffer_index >= 0) && (attr_state->buffer_index < SG_MAX_VERTEXBUFFER_BINDSLOTS));
cmn->vertex_buffer_layout_active[attr_state->buffer_index] = true;
cmn->required_bindings_and_uniforms |= required_bindings_flag;
}