Ticket #1838 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

msInsertLayer does not set the layer index properly

Reported by: szekerest Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description

insertLayer does not set the layer index properly if the layer is inserted
between the existing layers.

mapobject.c line 520
/* copy new layer to specified index */
        freeLayer(&(map->layers[nIndex]));
        initLayer(&(map->layers[nIndex]), map);
        msCopyLayer(&(map->layers[nIndex]), layer);
        map->layers[map->numlayers].index = nIndex;

the last line should be replaced with:

map->layers[nIndex].index = nIndex;

Tamas

Change History

Changed 7 years ago by sdlime

  • status changed from new to closed
  • resolution set to fixed
Fixed in CVS HEAD...

Steve
Note: See TracTickets for help on using tickets.