summaryrefslogtreecommitdiff
path: root/ft_strncmp.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_strncmp.c
parentf861789c3e5e004395c1b7214757d5a83625d845 (diff)
downloadlibft-c63ee0defff25db4612e9114d847b5045948e366.tar.gz
libft-c63ee0defff25db4612e9114d847b5045948e366.zip
Add stuff, fix stuff and whatever
Diffstat (limited to 'ft_strncmp.c')
-rw-r--r--ft_strncmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ft_strncmp.c b/ft_strncmp.c
index 2d54ec5..af24b2a 100644
--- a/ft_strncmp.c
+++ b/ft_strncmp.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/06 14:45:10 by dkaiser #+# #+# */
-/* Updated: 2024/03/06 15:10:48 by dkaiser ### ########.fr */
+/* Updated: 2024/03/07 14:26:15 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,7 +19,7 @@ int ft_strncmp(const char *s1, const char *s2, size_t n)
result = 0;
while (!result && n > 0 && (*s1 || *s2))
{
- result = *s1 - *s2;
+ result = (unsigned char)*s1 - (unsigned char)*s2;
if (*s1)
s1++;
if (*s2)