Skip to content

Commit

Permalink
Fix possible failure to derive certain features
Browse files Browse the repository at this point in the history
  • Loading branch information
garbear committed Oct 19, 2016
1 parent 0da70a1 commit 39751ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/buttonmapper/ButtonMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ void CButtonMapper::MergeFeatures(FeatureVector& features, const FeatureVector&
{
for (const auto& primitive : feature.Primitives())
{
if (primitive.Type() == JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN)
continue;

if (std::find(newPrimitives.begin(), newPrimitives.end(), primitive) != newPrimitives.end())
return true; // Found primitive
}
Expand Down

0 comments on commit 39751ff

Please sign in to comment.