about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-06-12 07:51:00 +0300
committerNakidai <nakidai@disroot.org>2025-06-12 07:51:00 +0300
commit06fba919c9d91cbc826a18ed3098814222e87831 (patch)
tree017c36f42be2a06c2ba06d86f1eecac20a7f5812
parente844fa3336ceac39f3a0c268eaff908edbfb1a17 (diff)
downloadfp-06fba919c9d91cbc826a18ed3098814222e87831.tar.gz
fp-06fba919c9d91cbc826a18ed3098814222e87831.zip
Fix strsub v1.1.1
strsub().fullness was UB if outside had not collisions with inside
-rw-r--r--fp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fp.c b/fp.c
index 6ff2447..073c972 100644
--- a/fp.c
+++ b/fp.c
@@ -64,7 +64,7 @@ void getchhnd(int sig)
 
 struct collision strsub(const char *outside, const char *inside)
 {
-	struct collision res = {0, 0};
+	struct collision res = {0, 0, 0};
 
 	size_t outlen = strlen(outside);
 	size_t inlen = strlen(inside);