Skip to content

Commit 6543d7d

Browse files
authored
fix error syntax in realloc
1 parent 1bed38d commit 6543d7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/account.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ pub const Account = struct {
9393
pub fn dataLen(self: Account) u64 {
9494
return self.ptr.data_len;
9595
}
96-
97-
pub fn realloc(self: Account, new_data_len: u64) error.InvalidRealloc!void {
98-
const diff = @subWithOverflow(new_data_len, self.original_data_len);
96+
97+
pub fn realloc(self: Account, new_data_len: u64) error{InvalidRealloc}!void {
98+
const diff = @subWithOverflow(new_data_len, self.ptr.original_data_len);
9999
if (diff[1] == 0 and diff[0] > ACCOUNT_DATA_PADDING) {
100100
return error.InvalidRealloc;
101101
}

0 commit comments

Comments
 (0)