Skip to content

Commit

Permalink
Assertion should allow empty compression (#36)
Browse files Browse the repository at this point in the history
The lower-level methods support empty, but this assertion on the wrapper
was causing failures when empty plaintext provided
  • Loading branch information
a10y authored Sep 17, 2024
1 parent a3839c7 commit 3b9e804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ impl Compressor {
// SAFETY: assertion
let bytes_written = out_ptr.offset_from(values.as_ptr());
assert!(
bytes_written.is_positive(),
bytes_written >= 0,
"out_ptr ended before it started, not possible"
);

Expand Down

0 comments on commit 3b9e804

Please sign in to comment.