diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-01-29 04:41:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-01-29 17:05:51 +0300 |
commit | d88492d4ad432a66d72269fe5fa514b18d0407ff (patch) | |
tree | 56873daf8d53ced11a33becc45d7ca667507d30c | |
parent | 314ea1b1c7dde85052130cfc0af9bec2f359e710 (diff) |
Object Mode: Fix reading past buffer end when drawing camera
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index a64d7f288ca..a9286fc0fe0 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1905,7 +1905,7 @@ static void DRW_shgroup_camera(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLay normalize_m4_m4(cam->drwnormalmat, ob->obmat); if (cam->flag & CAM_SHOWLIMITS) { - static float col[3] = {0.5f, 0.5f, 0.25f}, col_hi[3] = {1.0f, 1.0f, 0.5f}; + static float col[4] = {0.5f, 0.5f, 0.25f, 1.0f}, col_hi[4] = {1.0f, 1.0f, 0.5f, 1.0f}; float sizemat[4][4], size[3] = {1.0f, 1.0f, 0.0f}; float focusdist = BKE_camera_object_dof_distance(ob); @@ -1930,7 +1930,7 @@ static void DRW_shgroup_camera(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLay World *world = scene->world; if (world) { - static float col[3] = {0.5f, 0.5f, 0.5f}, col_hi[3] = {1.0f, 1.0f, 1.0f}; + static float col[4] = {0.5f, 0.5f, 0.5f, 1.0f}, col_hi[4] = {1.0f, 1.0f, 1.0f, 1.0f}; world->mistend = world->miststa + world->mistdist; DRW_shgroup_call_dynamic_add( sgl->camera_mist, color, |