aboutsummaryrefslogtreecommitdiff
path: root/tests/common/mod.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-04 12:09:16 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-04 12:09:16 +0100
commit7ae9966675c85b34f1a99d81062b44b74385a15b (patch)
tree9f52832b90685913beda8f1bf19a22b2ec7bc6c6 /tests/common/mod.rs
parent3f5d7fa766c268923c0c2c6e1dd50f4693f51a44 (diff)
downloadaerogramme-7ae9966675c85b34f1a99d81062b44b74385a15b.tar.gz
aerogramme-7ae9966675c85b34f1a99d81062b44b74385a15b.zip
test enable
Diffstat (limited to 'tests/common/mod.rs')
-rw-r--r--tests/common/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index d0f4ed8..810fd79 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -81,7 +81,7 @@ pub fn read_lines<'a, F: Read>(
None => true,
Some(mark) => buffer[..nbytes].windows(mark.len()).any(|w| w == mark),
};
- if pre_condition && &buffer[nbytes - 2..nbytes] == &b"\r\n"[..] {
+ if pre_condition && nbytes >= 2 && &buffer[nbytes - 2..nbytes] == &b"\r\n"[..] {
break;
}
}