aboutsummaryrefslogtreecommitdiff
path: root/core/vset.h
diff options
context:
space:
mode:
authorHein-Pieter van Braam2017-09-01 22:33:39 +0200
committerHein-Pieter van Braam2017-09-02 01:59:26 +0200
commit9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch)
tree7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /core/vset.h
parentdac150108ab3c1f41d5fd86cc6853f883064caaf (diff)
downloadgodot-9c63ab99f0a505b0f60079bb30cc453b4415fddc.tar.gz
godot-9c63ab99f0a505b0f60079bb30cc453b4415fddc.tar.zst
godot-9c63ab99f0a505b0f60079bb30cc453b4415fddc.zip
Diffstat (limited to 'core/vset.h')
-rw-r--r--core/vset.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/vset.h b/core/vset.h
index 7b12ae0b2..67af6c1a4 100644
--- a/core/vset.h
+++ b/core/vset.h
@@ -46,8 +46,13 @@ class VSet {
int low = 0;
int high = _data.size() - 1;
- int middle;
const T *a = &_data[0];
+ int middle = 0;
+
+#if DEBUG_ENABLED
+ if (low > high)
+ ERR_PRINT("low > high, this may be a bug");
+#endif
while (low <= high) {
middle = (low + high) / 2;