Skip to content

ft_strlcpy.c doesn't behave as expected #1

@Toyama70

Description

@Toyama70

If you use this main, you can notice there is an issue with the ft_strlcpy function you created, if I am not mistaken :

int main()
{
char str1[] = "hellooo";
char str2[] = "tim";

printf("%s", str1);

printf("%c", '\n');
ft_strlcpy(str1, str2, 3);

printf("%s", str1);

}

The expected output is : "ti".
Your function outputs "tim".

Real function outputs "ti", the one I wrote too. The moulinette might not notice some issues as the tests are randomized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions