summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read.c b/read.c
index df1a467..50333b5 100644
--- a/read.c
+++ b/read.c
@@ -127,7 +127,7 @@ static char *seekNewline(char *s, size_t len) {
* might not have a trailing NULL character. */
while (pos < _len) {
while(pos < _len && s[pos] != '\r') pos++;
- if (s[pos] != '\r') {
+ if (pos==_len) {
/* Not found. */
return NULL;
} else {