]> git.mar77i.info Git - otp_nano/commitdiff
search_matches: allow matches up to the colon master
authormar77i <mar77i@protonmail.ch>
Tue, 25 Aug 2026 09:02:19 +0000 (11:02 +0200)
committermar77i <mar77i@protonmail.ch>
Tue, 25 Aug 2026 09:02:19 +0000 (11:02 +0200)
decrypt.c

index 7c6b9e478cc3cecaca87f48c3138cb7620e27d90..17fa13ce310bd11e45ecff93febc330c61a3825f 100644 (file)
--- a/decrypt.c
+++ b/decrypt.c
@@ -173,7 +173,7 @@ static inline search_matches(uint8_t *search, uint8_t *line, uint8_t colon_offse
         search == NULL || *search == '\0' || (
             // or a match was made excluding the :
             (ptr = strstr(line, search)) != NULL
         search == NULL || *search == '\0' || (
             // or a match was made excluding the :
             (ptr = strstr(line, search)) != NULL
-            && ptr + strlen(search) < line + colon_offset
+            && ptr + strlen(search) <= line + colon_offset
         )
     );
 }
         )
     );
 }