osd: fix osdcaps parsing negative return value

This commit is contained in:
Sage Weil 2010-09-12 20:26:57 -07:00
parent c8da246a3a
commit 3695de1e6e

View File

@ -40,16 +40,16 @@ bool OSDCaps::get_next_token(string s, size_t& pos, string& token)
int start = s.find_first_not_of(" \t", pos);
int end;
if (start < 0) {
return false;
}
if (s[start] == '=' || s[start] == ',' || s[start] == ';') {
end = start + 1;
} else {
end = s.find_first_of(";,= \t", start+1);
}
if (start < 0) {
return false;
}
if (end < 0) {
end=s.size();
}