summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/de/parse.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/de/parse.rs b/src/de/parse.rs
index 0d4c1db..6f10ac3 100644
--- a/src/de/parse.rs
+++ b/src/de/parse.rs
@@ -140,7 +140,7 @@ impl<'a> Iterator for Parser<'a> {
self.index += 1;
self.acc.1 += 1;
match self.iter.next() {
- Some(v) if v == &b'%' => {
+ Some(v) if v == &b'%' && self.iter.len() >= 2 => {
match &self.iter.as_slice()[..2] {
b"5B" => {
// skip the next two characters