aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/string_immutable.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index 3e3880331..079817362 100644
--- a/src/string_immutable.zig
+++ b/src/string_immutable.zig
@@ -1082,7 +1082,8 @@ pub fn toUTF16Alloc(allocator: std.mem.Allocator, bytes: []const u8, comptime fa
},
else => return out,
}
- };
+ } else null;
+
var output = output_ orelse fallback: {
var list = try std.ArrayList(u16).initCapacity(allocator, i + 2);
list.items.len = i;