forked from Bananymous/banan-os
LibC: Fix stpncpy
I had misunderstood and tought that the string is always null terminated
This commit is contained in:
parent
c773e2ed07
commit
1cd5b3c20c
|
@ -89,7 +89,6 @@ char* stpncpy(char* __restrict__ dest, const char* __restrict__ src, size_t n)
|
||||||
dest[i] = src[i];
|
dest[i] = src[i];
|
||||||
for (; n; i++, n--)
|
for (; n; i++, n--)
|
||||||
dest[i] = '\0';
|
dest[i] = '\0';
|
||||||
dest[i] = '\0';
|
|
||||||
return &dest[i];
|
return &dest[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue