aboutsummaryrefslogtreecommitdiff
path: root/src/checker/stmt.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-11-15 12:06:58 +0000
committerGinger Bill <bill@gingerbill.org>2016-11-15 12:06:58 +0000
commit0cab083b8fb31f33e96b68f3699ba5a83dbd3353 (patch)
tree14171c7e35dca94fee8c8b54f8120b08a76e8178 /src/checker/stmt.cpp
parent3ce044f84f24b096156d6b4ce527c93a15f19147 (diff)
#foreign_library; vector fields (x, y, z, w) for count <= 4
Diffstat (limited to 'src/checker/stmt.cpp')
-rw-r--r--src/checker/stmt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/checker/stmt.cpp b/src/checker/stmt.cpp
index 54ae39ba3..8f651184e 100644
--- a/src/checker/stmt.cpp
+++ b/src/checker/stmt.cpp
@@ -438,8 +438,8 @@ void check_stmt(Checker *c, AstNode *node, u32 flags) {
isize lhs_count = as->lhs.count;
isize rhs_count = operands.count;
- isize operand_index = 0;
- for_array(i, operands) {
+ isize operand_count = gb_min(as->lhs.count, operands.count);
+ for (isize i = 0; i < operand_count; i++) {
AstNode *lhs = as->lhs[i];
check_assignment_variable(c, &operands[i], lhs);
}