Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't correct check ft_strnew #128

Open
npiatiko opened this issue Nov 15, 2018 · 1 comment
Open

Doesn't correct check ft_strnew #128

npiatiko opened this issue Nov 15, 2018 · 1 comment

Comments

@npiatiko
Copy link

Not correct, but successful checked by 42filechecker end validated by MOULINETTE :

char	*ft_strnew(size_t size)
{
	char *str;

	if ((str = (char*)malloc(++size)) == 0)
		return (NULL);
	while (size)
	{
		*(str + size) = '\0';
		size--;
	}
	*str = '\0';
	return (str);
}

PS problem in ++size

@jgigault
Copy link
Owner

Hello @npiatiko
Thanks for the issue, can you provide more information?
Do you mean that moulitest, libft-unit-test and/or Maintest should have failed and why?
Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants