summaryrefslogtreecommitdiff
path: root/ft_strchr.c
diff options
context:
space:
mode:
authorDominik Kaiser2024-03-07 16:51:56 +0100
committerDominik Kaiser2024-03-07 16:51:56 +0100
commitc63ee0defff25db4612e9114d847b5045948e366 (patch)
treea498874d7b02af25d0511b5f48bb5e57ccea5919 /ft_strchr.c
parentf861789c3e5e004395c1b7214757d5a83625d845 (diff)
downloadlibft-c63ee0defff25db4612e9114d847b5045948e366.tar.gz
libft-c63ee0defff25db4612e9114d847b5045948e366.zip
Add stuff, fix stuff and whatever
Diffstat (limited to 'ft_strchr.c')
-rw-r--r--ft_strchr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ft_strchr.c b/ft_strchr.c
index e53f78e..0b20bb4 100644
--- a/ft_strchr.c
+++ b/ft_strchr.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/06 14:12:39 by dkaiser #+# #+# */
-/* Updated: 2024/03/06 14:35:37 by dkaiser ### ########.fr */
+/* Updated: 2024/03/07 16:10:27 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -21,6 +21,8 @@ char *ft_strchr(const char *s, int c)
return ((char *)&s[i]);
i++;
}
+ if (!c)
+ return ((char *)&s[i]);
return (0);
}