summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-10-17 01:00:27 +0200
committerMichal Idziorek <m.i@gmx.at>2014-10-17 01:00:27 +0200
commit3983a157056f10651f120cf39c5d3637aa956903 (patch)
tree5d956c9dfb4c625d975a2bc035fd32aa1950b84b /lib
parent1580f8b4401b5f7e6ead12c94cafd42bb045ec6b (diff)
added simple syscall interface
Diffstat (limited to 'lib')
-rw-r--r--lib/string/string.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/string/string.c b/lib/string/string.c
index bdd92c9..9f58c43 100644
--- a/lib/string/string.c
+++ b/lib/string/string.c
@@ -1,6 +1,5 @@
#include "lib/bool/bool.h"
-
//length 0 for null terminated strings;
bool strcmp(char *str1, char *str2, int length)
{
@@ -11,6 +10,11 @@ bool strcmp(char *str1, char *str2, int length)
i++;
if(i==length) return true;
- if(length==0&&str1[i]==0&&str2[i]==0) return true;
+ if(str1[i]==0||str2[i]==0)
+ {
+ if(str1[i]==str2[i])return true;
+ return false;
+ }
}
+
}