diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-03 00:15:51 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-03 00:15:51 +0200 |
| commit | aad04a2208fbde8db2c1a81d6057c1ac4edb390e (patch) | |
| tree | 87f3b47c5f85d6c7c5921e799571b42906d0eb0a /lib | |
| parent | 1a3a3a20773a5664c653a8aebcd10d288962285b (diff) | |
ACPI support !
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/string/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/string/string.c b/lib/string/string.c index 45d8ad1..bdd92c9 100644 --- a/lib/string/string.c +++ b/lib/string/string.c @@ -5,11 +5,12 @@ bool strcmp(char *str1, char *str2, int length) { int i=0; - while(true) { if(str1[i]!=str2[i])return false; i++; - if(i==length||str1[i]==str2[i]==0) return true; + + if(i==length) return true; + if(length==0&&str1[i]==0&&str2[i]==0) return true; } } |
