diff --git a/src/rendering/twn_gl_any_rendering.c b/src/rendering/twn_gl_any_rendering.c index c0510ab..9c30571 100644 --- a/src/rendering/twn_gl_any_rendering.c +++ b/src/rendering/twn_gl_any_rendering.c @@ -65,7 +65,7 @@ VertexBuffer get_circle_element_buffer(void) { if (buffer == 0) { buffer = create_vertex_buffer(); - VertexBufferBuilder builder = build_vertex_buffer(buffer, sizeof (GLshort) * CIRCLE_ELEMENT_BUFFER_LENGTH); + VertexBufferBuilder builder = build_vertex_buffer(buffer, sizeof (GLshort) * (CIRCLE_VERTICES_MAX - 1) * 3); for (size_t i = 1; i < CIRCLE_VERTICES_MAX; ++i) { /* first one is center point index, always zero */