Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git] / lunaix-os / libs / klibc / string / strcpy.c
index 88b5cb1ca2a02ab298e6f8b8a0532e59bcd0b454..86032d91ec03dbceab54e2e3ecc5bb14258c19c8 100644 (file)
@@ -9,8 +9,8 @@ strcpy(char* dest, const char* src)
         dest[i] = c;
         i++;
     }
-    dest[i] = '\0';
-    return dest;
+    dest[i++] = '\0';
+    return &dest[i];
 }
 
 char*