From ea46d05aed0343c20d8fdfaa0e67d54d51e8e2a0 Mon Sep 17 00:00:00 2001 From: "John Wilbert M. Villamor" Date: Fri, 22 Nov 2019 09:11:12 +0800 Subject: Added long awaited CD-ROM library and loads of fixes, see changelog for details --- libpsn00b/libc/string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpsn00b/libc/string.c') diff --git a/libpsn00b/libc/string.c b/libpsn00b/libc/string.c index a14d950..0b7307d 100644 --- a/libpsn00b/libc/string.c +++ b/libpsn00b/libc/string.c @@ -43,7 +43,7 @@ char *strncpy(char *dst, const char *src, int len) len--; } - if(len)*dst = 0; + *dst = 0; return odst; } @@ -139,13 +139,13 @@ char *strstr(const char *big, const char *little) int strcmp(const char *s1, const char *s2) { - while(*s1 && *s2 && (*s1 == *s2)) + while((*s1) && (*s2) && (*s1 == *s2)) { s1++; s2++; } - return *s1-*s2; + return(*s1-*s2); } int strncmp(const char *s1, const char *s2, int len) -- cgit v1.2.3