why does this segfault?

This commit is contained in:
LinlyBoi
2023-08-19 23:04:35 +03:00
parent 92738bbd3d
commit 51f1e32eb2
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
*/
int _strlen(char *str)
{
if (*str)
if (str)
return (1 + _strlen(str++));
else
return (0);
@@ -23,7 +23,7 @@ int _strlen(char *str)
*
* Return: number of unique cases of "%*" that aren't "%%"
*/
int _contains(char *str, char c)
int _contains(const char *str, char c)
{
if (*str)
{