Browse Source

Fix [^]u8 to cstring conversion

gingerBill 3 years ago
parent
commit
6fab93c4b3
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/llvm_backend_expr.cpp

+ 6 - 0
src/llvm_backend_expr.cpp

@@ -1045,6 +1045,12 @@ lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
 	if (is_type_u8_ptr(src) && is_type_cstring(dst)) {
 		return lb_emit_transmute(p, value, dst);
 	}
+	if (is_type_cstring(src) && is_type_u8_multi_ptr(dst)) {
+		return lb_emit_transmute(p, value, dst);
+	}
+	if (is_type_u8_multi_ptr(src) && is_type_cstring(dst)) {
+		return lb_emit_transmute(p, value, dst);
+	}
 	if (is_type_cstring(src) && is_type_rawptr(dst)) {
 		return lb_emit_transmute(p, value, dst);
 	}