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