Mesh Batch Cache: Fix uninitialized loop variable
authorClément Foucault <foucault.clem@gmail.com>
Wed, 19 Dec 2018 13:07:44 +0000 (14:07 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Wed, 19 Dec 2018 21:56:15 +0000 (22:56 +0100)
source/blender/draw/intern/draw_cache_impl_mesh.c

index b84604ab74356afa2db688ab160886d422467fd7..9a0daf244ef36f44da751c07f2cf2cfa0eb09a4a 100644 (file)
@@ -4267,7 +4267,7 @@ static void mesh_create_loops_lines(
                        BM_ITER_MESH (bm_face, &iter, bm, BM_FACES_OF_MESH) {
                                /* use_hide always for edit-mode */
                                if (!BM_elem_flag_test(bm_face, BM_ELEM_HIDDEN)) {
-                                       for (int i; i < bm_face->len; i++) {
+                                       for (int i = 0; i < bm_face->len; i++) {
                                                GPU_indexbuf_add_generic_vert(&elb, v_index + i);
                                        }
                                        /* Finish loop and restart primitive. */