[Bf-blender-cvs] [1b1702abb0c] blender2.8: Fix runtime error: shift of uint

Dalai Felinto noreply at git.blender.org
Wed Oct 10 18:36:08 CEST 2018


Commit: 1b1702abb0cb16c5c5e36db441af43ee31efde39
Author: Dalai Felinto
Date:   Wed Oct 10 13:34:59 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB1b1702abb0cb16c5c5e36db441af43ee31efde39

Fix runtime error: shift of uint

The warning was: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'

Patch by Clément Foucault.

===================================================================

M	source/blender/draw/intern/draw_cache_impl_mesh.c

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index d81780fcd9b..bcdf3a3cf08 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -3600,7 +3600,7 @@ static GPUVertBuf *mesh_batch_cache_create_edges_overlay_texture_buf(MeshRenderD
 			}
 			/* Non-manifold edge */
 			if (eav->vert_index[1] == -1) {
-				value |= (1 << 31);
+				value |= (1u << 31);
 			}
 			GPU_vertbuf_attr_set(vbo, index_id, vidx++, &value);
 		}



More information about the Bf-blender-cvs mailing list