diff options
| author | Hein-Pieter van Braam | 2017-09-01 22:33:39 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2017-09-02 01:59:26 +0200 |
| commit | 9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch) | |
| tree | 7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /core/vset.h | |
| parent | dac150108ab3c1f41d5fd86cc6853f883064caaf (diff) | |
| download | godot-9c63ab99f0a505b0f60079bb30cc453b4415fddc.tar.gz godot-9c63ab99f0a505b0f60079bb30cc453b4415fddc.tar.zst godot-9c63ab99f0a505b0f60079bb30cc453b4415fddc.zip | |
Diffstat (limited to 'core/vset.h')
| -rw-r--r-- | core/vset.h | 7 |
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; |
