summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_misc.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2025-01-30 12:30:40 +0100
committerOliver Kiddle <opk@zsh.org>2025-01-30 12:30:40 +0100
commitf7b5cc431bdda1f7123aca740bf7c535b98ca616 (patch)
tree4cdf1304b1a709b8ed7ae8284e334098b3df3921 /Src/Zle/zle_misc.c
parent4f3d69e2a0bc6b4d98a4aa3ef37ebea44cbda51f (diff)
downloadzsh-f7b5cc431bdda1f7123aca740bf7c535b98ca616.tar.gz
zsh-f7b5cc431bdda1f7123aca740bf7c535b98ca616.zip
53332, 53334: Avoid strlen calls after sprintf
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r--Src/Zle/zle_misc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index eba28d1ec..e17a08d53 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -841,9 +841,8 @@ whatcursorposition(UNUSED(char **args))
strcpy(s, mbstr);
s += len;
}
- sprintf(s, " (0%o, %u, 0x%x)", (unsigned int)c,
+ s += sprintf(s, " (0%o, %u, 0x%x)", (unsigned int)c,
(unsigned int)c, (unsigned int)c);
- s += strlen(s);
}
sprintf(s, " point %d of %d(%d%%) column %d", zlecs+1, zlell+1,
zlell ? 100 * zlecs / zlell : 0, zlecs - bol);