Skip to content

Commit

Permalink
bugfix shift overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonVandeVyver committed Oct 14, 2024
1 parent 1b15fad commit 9053d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sa-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn build_ssa(
SAConstructionAlgorithm::LibSais => {
let mut packed_text = bitpack_text(text, sparseness_factor);

libsais64_rs::sais64_long(&mut packed_text, 1 << (BITS_PER_CHAR * sparseness_factor as usize), sparseness_factor)
libsais64_rs::sais64_long(&mut packed_text, (1 as i64) << (BITS_PER_CHAR * sparseness_factor as usize), sparseness_factor)
},
SAConstructionAlgorithm::LibDivSufSort => libdivsufsort_rs::divsufsort64(text)
}
Expand Down

0 comments on commit 9053d25

Please sign in to comment.