diff options
Diffstat (limited to 'hw4/l4basic')
-rw-r--r-- | hw4/l4basic/l4str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw4/l4basic/l4str.c b/hw4/l4basic/l4str.c index 5569f7a..d0a4894 100644 --- a/hw4/l4basic/l4str.c +++ b/hw4/l4basic/l4str.c @@ -9,7 +9,7 @@ bool lbs_str_has_prefix (const char* str, const char* prefix) { int i; - for (i = 0; str != '\0' && prefix[i] != '\0'; i++) { + for (i = 0; str[i] != '\0' && prefix[i] != '\0'; i++) { if (str[i] != prefix[i]) { return false; } |