aboutsummaryrefslogtreecommitdiff
path: root/src/range_set.cpp
diff options
context:
space:
mode:
authorVexu <15308111+Vexu@users.noreply.github.com>2019-11-23 19:13:48 +0200
committerVexu <15308111+Vexu@users.noreply.github.com>2019-11-23 19:13:48 +0200
commit03cc81665bb28eb35c8c6d4be17b5a56fa66261f (patch)
treee686671775e606c3cf1129b535f2c2487e4e6e3c /src/range_set.cpp
parent86d9563d1539cd7581dc120023bb830fae77ba0f (diff)
parentad0871ea4bf2dfbed07282ffe14738b5347d5d32 (diff)
downloadzig-03cc81665bb28eb35c8c6d4be17b5a56fa66261f.tar.gz
zig-03cc81665bb28eb35c8c6d4be17b5a56fa66261f.zip
Merge branch 'master' into modernize-stage2
Diffstat (limited to 'src/range_set.cpp')
-rw-r--r--src/range_set.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/range_set.cpp b/src/range_set.cpp
index fd0076191b..9e621d2f13 100644
--- a/src/range_set.cpp
+++ b/src/range_set.cpp
@@ -40,6 +40,9 @@ void rangeset_sort(RangeSet *rs) {
}
bool rangeset_spans(RangeSet *rs, BigInt *first, BigInt *last) {
+ if (rs->src_range_list.length == 0)
+ return false;
+
rangeset_sort(rs);
const Range *first_range = &rs->src_range_list.at(0).range;