diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-11-16 18:27:54 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-11-16 18:27:54 +0000 |
| commit | 4895031df56c8378db756db8d330f5cb07d4b14a (patch) | |
| tree | 71fcbfe366e88bb5ca7785305dc9035dd71072f7 /src/checker/types.cpp | |
| parent | e2d98324bae3c8e5f5e41d0fad9b67bfe2d345d1 (diff) | |
Actually fix alignment for vectors
Whoops :P
Diffstat (limited to 'src/checker/types.cpp')
| -rw-r--r-- | src/checker/types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checker/types.cpp b/src/checker/types.cpp index 98b5f297f..92111f186 100644 --- a/src/checker/types.cpp +++ b/src/checker/types.cpp @@ -1059,7 +1059,7 @@ i64 type_align_of(BaseTypeSizes s, gbAllocator allocator, Type *t) { return type_align_of(s, allocator, t->Array.elem); case Type_Vector: { i64 size = type_size_of(s, allocator, t->Vector.elem); - i64 count = gb_max(prev_pow2(size), 1); + i64 count = gb_max(prev_pow2(t->Vector.count), 1); i64 total = size * count; return gb_clamp(total, 1, s.max_align); } break; |