git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fixed EOS calculation
[tpg/acess2.git]
/
Kernel
/
lib.c
diff --git
a/Kernel/lib.c
b/Kernel/lib.c
index
c106351
..
3399d3d
100644
(file)
--- a/
Kernel/lib.c
+++ b/
Kernel/lib.c
@@
-141,7
+141,8
@@
int strcmp(char *str1, char *str2)
*/
int strncmp(char *Str1, char *Str2, size_t num)
{
- while(num-- && *Str1 && *Str1 == *Str2)
+ if(num == 0) return 0; // TODO: Check what should officially happen here
+ while(--num && *Str1 && *Str1 == *Str2)
Str1++, Str2++;
return *Str1-*Str2;
}
UCC
git Repository :: git.ucc.asn.au