Skip to content

Commit 6678e7a

Browse files
committed
fixed another error
1 parent 59b5cdb commit 6678e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zig-string.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub const String = struct {
139139

140140
/// Returns an owned slice of this string
141141
pub fn toOwned(self: String) Error!?[]u8 {
142-
if (self.buffer) {
142+
if (self.buffer != null) {
143143
const string = self.str();
144144
if (self.allocator.alloc(u8, string.len)) |newStr| {
145145
std.mem.copy(u8, newStr, string);

0 commit comments

Comments
 (0)