From 6c3be2ca74bdfb0cc133529749fac1112df26945 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Mon, 18 Nov 2019 12:45:01 +0000 Subject: Fix Visual Studio throwing C4146 warning. --- servers/visual/shader_language.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'servers/visual/shader_language.cpp') diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 9babc99349..316a94556d 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -3769,8 +3769,8 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha nv.sint = -cn->values[i].sint; } break; case TYPE_UINT: { - // FIXME: This can't work on uint - nv.uint = -cn->values[i].uint; + // Intentionally wrap the unsigned int value, because GLSL does. + nv.uint = 0 - cn->values[i].uint; } break; case TYPE_FLOAT: { nv.real = -cn->values[i].real; -- cgit v1.2.3