requiredFeatures almost always evaluates to false

Bug #1600496 reported by Stephen Parry on 2016-07-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
Stephen Parry

Bug Description

Due to incorrect coding of line 219 in conditions.cpp, only the feature:
http://www.w3.org/TR/SVG11/feature#SVG
will ever match. The code says:
<code>
    for ( unsigned int i = 0 ; i < sizeof(_supported_features)/sizeof(_supported_features[0]); i++ ) {
        if ( 0 == strcasecmp(feature, _supported_features[0]) )
            return true;
    }
    return false;
</code>
It should say:
<code>
    for ( unsigned int i = 0 ; i < sizeof(_supported_features)/sizeof(_supported_features[0]); i++ ) {
        if ( 0 == strcasecmp(feature, _supported_features[i]) )
            return true;
    }
    return false;
</code>

Stephen Parry (sgparry) wrote :

Have uploaded proposed fix

jazzynico (jazzynico) on 2016-07-31
tags: added: code-design svg
Changed in inkscape:
status: New → In Progress
assignee: nobody → Stephen Parry (sgparry)
milestone: none → 0.93
Qantas94Heavy (qantas94heavy) wrote :

Hi there, it appears this still hasn't been merged into master. As Inkscape now uses GitLab, would you like to submit a merge request there? Here's our GitLab repo: https://gitlab.com/inkscape/inkscape. Thank you!

Changed in inkscape:
status: In Progress → Triaged
importance: Undecided → Low
Patrick Storz (ede123) wrote :
Changed in inkscape:
status: Triaged → Fix Committed
tags: added: backport-proposed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers