From 5aaa7240a20f34d319bee496005e2136040b8f5c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 16 Mar 2016 17:27:00 +0100 Subject: [PATCH] libc: fix runestrecpy() return value (thanks spew) --- sys/src/libc/port/runestrecpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/src/libc/port/runestrecpy.c b/sys/src/libc/port/runestrecpy.c index d3ca81044..7b85928bc 100644 --- a/sys/src/libc/port/runestrecpy.c +++ b/sys/src/libc/port/runestrecpy.c @@ -9,9 +9,9 @@ runestrecpy(Rune *s1, Rune *es1, Rune *s2) while(*s1++ = *s2++){ if(s1 == es1){ - *--s1 = '\0'; + s1[-1] = '\0'; break; } } - return s1; + return s1-1; }