From e7726f91c743d82661b87f37142d5bc2d5a3f6bd Mon Sep 17 00:00:00 2001 From: Jop Zitman Date: Mon, 19 Jan 2026 22:28:07 +0100 Subject: [PATCH] fix: Skip trailing dot closes #12 --- src/slipstream_inline_dots.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slipstream_inline_dots.c b/src/slipstream_inline_dots.c index ecf776c..66000fe 100644 --- a/src/slipstream_inline_dots.c +++ b/src/slipstream_inline_dots.c @@ -25,7 +25,7 @@ size_t slipstream_inline_dotify(char * __restrict__ buf, size_t buflen, size_t l // Move characters right-to-left, inserting dots while (current_pos > 0) { - if (current_pos == next_dot) { + if (current_pos == next_dot && next_dot != len) { *dst-- = '.'; // Dot. Because rules are rules, even for dots. next_dot -= 57; // Next dot is 57 chars back. current_pos--; // Account for the char space the dot took.