Opened 10 years ago

Closed 10 years ago

Last modified 9 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 by Even Rouault, 10 years ago

Milestone: 2.0
Resolution: fixed
Status: newclosed

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

comment:2 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.