refactor: split frag0 into multiple files

This commit is contained in:
2025-11-08 22:35:10 +01:00
parent b4b79cea12
commit 248c947fad
31 changed files with 2041 additions and 1875 deletions
+2 -3
View File
@@ -60,12 +60,11 @@ char *string_replace_at(char *src, unsigned int from, unsigned int to,
src_len = strlen(src);
rpl_len = strlen(rpl);
dst =
malloc(src_len - (to - from) + rpl_len + 1); // +1 for the null-terminator
dst = malloc(src_len - (to - from) + rpl_len + 1);
strncpy(dst, src, from);
strncpy(dst + from, rpl, rpl_len);
strncpy(dst + from + rpl_len, src + to, src_len - to);
strlcpy(dst + from + rpl_len, src + to, src_len - to + 1);
return dst;
}