Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5540 closed defect (fixed)

CPLStringList sorting/search broken

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 2.0.0
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

If we insert metadata like

FILENAME_0=x
FILENAME_1=x
[...]
FILENAME_9=x
FILENAME_10=x
[...]
FILENAME_19=x
[...]

we will not be able to retrieve FILENAME_1 with GetMetadataItem?() since the sorting in CPLStringList is done on full strings (key=value), but the binary search is done on keys only. Both sorting order might be different.

Seen on NITF subdatasets that expose filenames as FILENAME_%d=filename metadata items.

Change History (2)

comment:1 Changed 7 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r27496 "Fix correct sorting of StringList? / metadata (#5540, #5557)"

comment:2 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.