Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
There was an off-by-one error on boundscheck.
Browse files Browse the repository at this point in the history
  • Loading branch information
alcinnz committed Feb 2, 2021
1 parent 87710c2 commit 407dea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/Prosody/slice.vala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Slice : Gee.Hashable<Slice>, Object {

public int length {get {return _.length;}}
public new uint8 get(int i) {
if (i > length) return 0;
if (i >= length) return 0;
return _[i < 0 ? length + i : i];
}
public Slice slice(int start_, int end_) {
Expand Down

0 comments on commit 407dea0

Please sign in to comment.