Fix builds.

This commit is contained in:
Stephen Chung
2022-11-23 18:02:10 +08:00
parent 02ef119603
commit 46514bbc85
4 changed files with 24 additions and 20 deletions

View File

@@ -270,7 +270,7 @@ impl Engine {
} else {
let abs_index = index.unsigned_abs();
if abs_index > usize::MAX as u64 {
if abs_index as u64 > usize::MAX as u64 {
return Err(
ERR::ErrorStringBounds(s.chars().count(), index, idx_pos).into()
);