summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDmitrii Maganov <vonagam@gmail.com>2023-01-12 20:18:23 +0200
committerDmitrii Maganov <vonagam@gmail.com>2023-01-13 15:36:11 +0200
commit40613ebd21263678ccca63d79bd0853e5d77cca4 (patch)
tree58d7727924f048d0dedcae641d7e081a9ec6af55 /core
parent3c9bf4bc210a8e6a208f30ca59de4d4d7e18c04d (diff)
GDScript: Fix typing of iterator in for loop
Diffstat (limited to 'core')
-rw-r--r--core/variant/variant_setget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp
index b8d4495702..a74556d88f 100644
--- a/core/variant/variant_setget.cpp
+++ b/core/variant/variant_setget.cpp
@@ -1253,7 +1253,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
return _data._int > 0;
} break;
case FLOAT: {
- r_iter = 0;
+ r_iter = 0.0;
return _data._float > 0.0;
} break;
case VECTOR2: {
@@ -1457,7 +1457,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
case FLOAT: {
- int64_t idx = r_iter;
+ double idx = r_iter;
idx++;
if (idx >= _data._float) {
return false;