summaryrefslogtreecommitdiffstats
path: root/include/framework/structure/InternalLevel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/framework/structure/InternalLevel.h')
-rw-r--r--include/framework/structure/InternalLevel.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/framework/structure/InternalLevel.h b/include/framework/structure/InternalLevel.h
index 6e8b67e..5659c72 100644
--- a/include/framework/structure/InternalLevel.h
+++ b/include/framework/structure/InternalLevel.h
@@ -102,8 +102,12 @@ public:
return false;
}
- const ShardType *get_shard(size_t idx) const {
- if (idx >= m_shards.size()) {
+ const ShardType *get_shard(ssize_t idx) const {
+ if (idx == all_shards_idx) {
+ idx = 0;
+ }
+
+ if (idx >= (ssize_t) m_shards.size()) {
return nullptr;
}