diff options
author | George Marques <george@gmarqu.es> | 2016-06-03 14:59:40 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2016-06-03 14:59:40 -0300 |
commit | 43dad78209e76fc37ae8b46ac3a8ffe4a589eb55 (patch) | |
tree | cee55a7b35e8acd8a7c267dcb79fac0badce29c6 /modules | |
parent | 21e05167b1f3afa46de33be76b17b600cd9c640c (diff) |
Fix Color8 constructor using wrong value range
Fix #5015
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gd_functions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index 1c05a71d01..5ea5908c5f 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -1010,11 +1010,11 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va VALIDATE_ARG_NUM(1); VALIDATE_ARG_NUM(2); - Color color(*p_args[0],*p_args[1],*p_args[2]); + Color color((float)*p_args[0]/255.0f,(float)*p_args[1]/255.0f,(float)*p_args[2]/255.0f); if (p_arg_count==4) { VALIDATE_ARG_NUM(3); - color.a=*p_args[3]; + color.a=(float)*p_args[3]/255.0f; } r_ret=color; |