summaryrefslogtreecommitdiff
path: root/src/core/model
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-29 00:20:54 +0100
committerAndreas Stöckel <andreas@somweyr.de>2014-12-29 00:20:54 +0100
commit0af66457f7739df4c1b151b2adb7479d87275c9a (patch)
tree82d0599d80b1f10bc613c2e1728cb6c9d0372fbc /src/core/model
parentcb3189b43290cb5bdf3b699f0cda1b6b6a5b871b (diff)
more unit tests
Diffstat (limited to 'src/core/model')
-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];
}