Fix slice indexing in example

This commit is contained in:
Krzosa Karol
2022-07-28 13:35:47 +02:00
parent b806bafb51
commit d8fda0ff8c
2 changed files with 8 additions and 2 deletions

View File

@@ -306,7 +306,7 @@ gen_expr(Ast_Expr *ast, Ast_Type *type_of_var){
if(!(type_of_var && type_of_var == type_pointer_to_char))
gen(".str");
}
else if(is_slice(node->resolved_type)){
else if(is_slice(node->index_original_type)){
gen(".data");
}
gen("[");