summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2019-11-18 12:45:01 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2019-11-18 15:14:04 +0000
commit6c3be2ca74bdfb0cc133529749fac1112df26945 (patch)
tree45f841767dd713be7852d19f0b5cab9daf60e8bb
parent3c831377712ec7b37d8f22739538e6abb3c7741f (diff)
Fix Visual Studio throwing C4146 warning.
-rw-r--r--servers/visual/shader_language.cpp4
1 files changed, 2 insertions, 2 deletions
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;