﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3657	Incorrect behaviour while using _GUICtrlListView_SimpleSort when no items are selected	s.smeitz@…	Melba23	"When using a ListView (singlesel not enabled) which is populated with a number of items and none are selected using _GUICtrlListView_SimpleSort will select an single item.

This is due to incorrect handling of the Stringsplit function in the _GUICtrlListView_SimpleSort function written in GuiListView.au3.

If no items are selected _GUICtrlListView_GetSelectedIndices with the default settings returns an empty string. If no separatorchars are found Stringsplit will return an array with two elements being [0] = 1 and [1] = whole string = """" which is default behaviour.

Later in the _GUICtrlListView_SimpleSort a for loop is used based on the first element of the Stringsplit return array. I.e. it uses the fact that there is one item selected in the Listview which is of course incorrect. This results in having one item selected after the SimpleSort.

Suggested fix:
After StringSplit check for errors and modify array[0] to 0 if an error.

if @error = 1 Then $aSelectedItems[0] = 0

"	Bug	closed	3.3.15.1	AutoIt	3.3.14.2	None	Fixed		
