add: \0 in strcpy strncpy and strcat

This commit is contained in:
2023-07-23 15:00:08 +02:00
parent 357da752fc
commit 1f60f4eab0
4 changed files with 24 additions and 4 deletions

View File

@ -3,9 +3,9 @@ strcpy(dst, src)
local i = 0;
loop {
[dst + i] = [src + i];
if ([src + i] == 0)
return (dst);
[dst + i] = [src + i];
i++;
}
}