commit 3a46aabe089e94eb74df1afc33cb48459294db20
parent 33a6e87b60b37fc7c5815f075ca0e856aff9ecee
Author: Eyal Sawady <ecs@d2evs.net>
Date: Sun, 9 May 2021 12:38:34 -0400
hare::types: fix string size
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hare/types/store.ha b/hare/types/store.ha
@@ -143,7 +143,7 @@ fn fromast(store: *typestore, atype: *ast::_type) (_type | deferred | error) = {
builtin::SIZE;
},
ast::builtin_type::STR => {
- sz += store.arch._pointer;
+ sz = store.arch._pointer;
sz += sz % store.arch._size + store.arch._size;
sz += store.arch._size;
align = if (store.arch._size > store.arch._pointer)