requiredFeatures almost always evaluates to false

Bug #1600496 reported by Stephen Parry
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
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>

Revision history for this message
Stephen Parry (sgparry) wrote :

Have uploaded proposed fix

jazzynico (jazzynico)
tags: added: code-design svg
Changed in inkscape:
status: New → In Progress
assignee: nobody → Stephen Parry (sgparry)
milestone: none → 0.93
Revision history for this message
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
Revision history for this message
Patrick Storz (ede123) wrote :
Changed in inkscape:
status: Triaged → Fix Committed
tags: added: backport-proposed
Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.