We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0186176 commit 73e8e49Copy full SHA for 73e8e49
src/rt/rust_builtin.cpp
@@ -312,8 +312,9 @@ str_byte_len(rust_task *task, rust_str *s)
312
extern "C" CDECL rust_str *
313
str_from_ivec(rust_task *task, rust_ivec *v)
314
{
315
- uintptr_t fill = v->fill ? v->fill : v->payload.ptr->fill;
316
- void *data = v->fill ? v->payload.data : v->payload.ptr->data;
+ bool is_interior = v->fill || !v->payload.ptr;
+ uintptr_t fill = is_interior ? v->fill : v->payload.ptr->fill;
317
+ void *data = is_interior ? v->payload.data : v->payload.ptr->data;
318
319
rust_str *st =
320
vec_alloc_with_data(task,
0 commit comments