Modify

Opened 13 years ago

Closed 13 years ago

#2374 closed Bug (Fixed)

Incorrect return values for up to 4 UDFs

Reported by: MHz Owned by: guinness
Milestone: 3.3.9.14 Component: Standard UDFs
Version: 3.3.9.13 Severity: None
Keywords: Cc:

Description

I have done a quick review of usage of SetError and SetExtended in the current Beta include files. I did this to check if the default return value of 1 of SetError and SetExtended is used. Most are good with using all parameters to override the default return value of 1.

I found some issues that may need attention

SetError Use

Note: The following UDF starts with double underscore. It is removed as the tracker software is changing it.

SQLite_ReportError lines 972 and 981 of SQLite.au3
Return not set or used anywhere. It is a internal function so set explicit return value to 0 is my advise.

_StringEncrypt() lines 59 and 61 of String.au3
Sets all 3 values without using the keyword Return which is ill use. It would return 0 on failure instead of the documented blank string.

_WinAPI_SetLastError() line 31 of WinAPIError.au3
Only 2 values for SetError. Perhaps set 3 parameters and use 1 as return value. Actually nothing is checked to qualify the default return value of 1 so 0 seems suitable. Document states return value is none so it seems to be a code bug. MSDN for SetLastError states "This function does not return a value"

SetExtended Use

_VersionCompare() line 449 of Misc.au3
SetExtended is reset by the following inbuilt function call before returning from the UDF when number comparison is used.

Attachments (0)

Change History (4)

comment:1 by guinness, 13 years ago

Which beta version are you using please?

comment:2 by MHz, 13 years ago

Beta Version 3.3.9.13

comment:3 by guinness, 13 years ago

I have moved the discussion to the help issues thread for clarification, as lines numbers aren't matching up either.

comment:4 by guinness, 13 years ago

Milestone: 3.3.9.14
Owner: set to guinness
Resolution: Fixed
Status: newclosed

Fixed by revision [8312] in version: 3.3.9.14

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.