Skip to content

Footprint name clamping at 32 chars generates Exception in case of similar names of footprints #18

@francescocaponio

Description

@francescocaponio

I noticed an issue when trying to import footprints with more than 32 chars and a similar name up until the 32nd char.

The problem appears in the function ReadSectionKeys of PcbLibReader.cs, and both libRef and sectionKey appear to clamp the name at 32 chars. The first item is added to the SectionKeys List, while the second one, which shows the same libRef, is not added and triggers the exception.

The debugger shows the Exception System.ArgumentException: Another element with the same key has been already added.

I attached a picture with the result and the same pcblib file used for the screenshot with just two footprints with similar names which will prompt the issue.

image
PcbLib3.zip

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