﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2340	_GUICtrlListView_SimpleSort changes sort parameter variable value	BrewManNH	guinness	"In reference to this thread [http://www.autoitscript.com/forum/topic/149831-help-on-listview-sorting/], I noticed that the function, _GUICtrlListView_SimpleSort, is changing the value of the variable passed to the function after it's done with sorting the listview.

What this does is it arbitrarily changes a value that a user passes it in their script, without telling them that it does so, and for no discernible reason, that I can see. It's inverting the value of the $vDescending variable, which is passed ByRef, from true to false or from false to true, after it has sorted the listview and recreated it. This, in my opinion, shouldn't be happening, because it can cause issues with code that uses this sort especially since it's not mentioned anywhere that it's doing this.

This section of code should be removed unless someone can explain why it's necessary, or why it's good practice.
{{{
If (IsArray($vDescending)) Then
	$vDescending[$iCol] = Not $b_desc
Else
	$vDescending = Not $b_desc
EndIf
}}}
"	Bug	closed	3.3.9.8	Standard UDFs	3.3.9.4	None	Completed		
