about summary refs log tree commit diff
path: root/src/string/swab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/swab.c')
-rw-r--r--src/string/swab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/swab.c b/src/string/swab.c
index 9ed6fcda..ace0f466 100644
--- a/src/string/swab.c
+++ b/src/string/swab.c
@@ -4,7 +4,7 @@ void swab(const void *restrict _src, void *restrict _dest, ssize_t n)
 {
 	const char *src = _src;
 	char *dest = _dest;
-	for (; n>0; n-=2) {
+	for (; n>1; n-=2) {
 		dest[0] = src[1];
 		dest[1] = src[0];
 		dest += 2;