##// END OF EJS Templates
manifest: rewrite pathlen() to not cross entry boundary...
Yuya Nishihara -
r39975:e85462d4 stable
parent child Browse files
Show More
@@ -42,7 +42,8 b' typedef struct {'
42 /* get the length of the path for a line */
42 /* get the length of the path for a line */
43 static size_t pathlen(line *l)
43 static size_t pathlen(line *l)
44 {
44 {
45 return strlen(l->start);
45 const char *end = memchr(l->start, '\0', l->len);
46 return (end) ? (size_t)(end - l->start) : l->len;
46 }
47 }
47
48
48 /* get the node value of a single line */
49 /* get the node value of a single line */
General Comments 0
You need to be logged in to leave comments. Login now