bendn 4 weeks ago
parent b77f981 · commit 06da2ce
-rw-r--r--src/lib.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index e5679aa..1e67b6b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -556,11 +556,10 @@ fn into(
}
read!(while 10);
read!(if 4);
-
- let mut n = with.width() - wx_;
- if n + x_ > i.width() {
- n = i.width() - x_ - 1;
- };
+ let mut n = with.width() - wx_;
+ if n + x_ + wx_ > i.width() {
+ n = i.width() - x_ - wx_;
+ }
unsafe { core::hint::assert_unchecked(n < 10) };
for k in 0..n {
let x = k + wx_;