summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/model/Typesystem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/model/Typesystem.cpp b/src/core/model/Typesystem.cpp
index 812d85c..8d5654c 100644
--- a/src/core/model/Typesystem.cpp
+++ b/src/core/model/Typesystem.cpp
@@ -244,7 +244,8 @@ bool StructType::buildFromArray(Variant &data, Logger &logger, bool trim) const
}
// Make sure the given attributes have to correct type
- for (size_t a = 0; a < n; a++) {
+ const size_t len = std::min(n, N);
+ for (size_t a = 0; a < len; a++) {
set[a] = attributes[a]->getType()->build(arr[a], logger);
ok = ok && set[a];
}