Skip to content

Commit

Permalink
Test 027 passes
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmstill committed Mar 26, 2024
1 parent d1d7f3b commit a92c5b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions biscuit-datalog/src/expression.zig
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ const Binary = enum {
.greater_or_equal => .{ .bool = i >= j },
.equal => .{ .bool = i == j },
.not_equal => .{ .bool = i != j },
.add => .{ .integer = i + j },
.sub => .{ .integer = i - j },
.mul => .{ .integer = i * j },
.add => .{ .integer = try std.math.add(i64, i, j) },
.sub => .{ .integer = try std.math.sub(i64, i, j) },
.mul => .{ .integer = try std.math.mul(i64, i, j) },
.div => .{ .integer = @divExact(i, j) },
.bitwise_and => .{ .integer = i & j },
.bitwise_or => .{ .integer = i | j },
Expand Down
1 change: 1 addition & 0 deletions biscuit-samples/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ pub fn validate(alloc: mem.Allocator, token: []const u8, public_key: std.crypto.
},
},
.Execution => runValidation(alloc, token, public_key, authorizer_code, &errors) catch |err| switch (err) {
error.Overflow => return,
else => return err,
},
}
Expand Down

0 comments on commit a92c5b0

Please sign in to comment.