aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-09-28 13:11:20 -0500
committerRob Landley <rob@landley.net>2014-09-28 13:11:20 -0500
commit562af2c0f2f4bd8420a26560f1816b6a81ac417e (patch)
tree3142e4afdc993df5c67d6cb27cd0b20f40100205 /lib
parent5d4fa5742fee322187d80bc5a9a55d41a621f8b6 (diff)
downloadtoybox-562af2c0f2f4bd8420a26560f1816b6a81ac417e.tar.gz
Brown paper bag time: comma_scan() didn't work for anything but the last entry.
Diffstat (limited to 'lib')
-rw-r--r--lib/getmountlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getmountlist.c b/lib/getmountlist.c
index 98347223..5f4bc63b 100644
--- a/lib/getmountlist.c
+++ b/lib/getmountlist.c
@@ -76,7 +76,7 @@ int comma_scan(char *optlist, char *opt, int clean)
if (!s) break;
no = 2*(*s == 'n' && s[1] == 'o');
- if (optlen == len+no && !strcmp(opt, s+no)) {
+ if (optlen == len-no && !strncmp(opt, s+no, optlen)) {
got = !no;
if (clean) memmove(s, optlist, strlen(optlist)+1);
}