Skip to content

[UwpList] handling caps.txt line feed encoding #9

@sirotnikov

Description

@sirotnikov

in UwpList.cpp in BuildCapabilityMap
string name(caps, cr - 1); assumes \r\n line feed but after getting sources, it was \n only.

Thus string name(caps, cr-1); creates a truncated string, as cr points at the last string char, and not one past it.

I suggest adding if (*(cr - 1) == '\r') cr--; and then string name(caps, cr); to be line feed agnostic.

this also makes sense with if (*cr == '\r') cr++; later, as it can't be both \n and '\r'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions