std::string::size_type pos = CStr.find_first_of('=');
assert(pos != std::string::npos && "Unrecognized constraint");
std::string::size_type start = CStr.find_first_not_of(" \t");
- std::string Name = CStr.substr(start, pos);
+ std::string Name = CStr.substr(start, pos - start);
// TIED_TO: $src1 = $dst
std::string::size_type wpos = Name.find_first_of(" \t");
if (eidx == std::string::npos)
eidx = CStr.length();
- ParseConstraint(CStr.substr(bidx, eidx), I);
+ ParseConstraint(CStr.substr(bidx, eidx - bidx), I);
bidx = CStr.find_first_not_of(delims, eidx);
}
}