Modify

#4089 new Bug

Fixing __ArrayDisplay_SortArrayStruct dll declaration

Reported by: anonymous Owned by:
Milestone: Component: Au3Check
Version: 3.3.18.0 Severity: None
Keywords: Cc:

Description

How to reproduct :
Global Const $hDll = 0
#include <Array.au3>

What happened :

".\AutoIt3\Include\ArrayDisplayInternals.au3"(830,40) : error: $hDll previously declared as a 'Const'.
	Static $hDll = DllOpen("kernel32.dll")

What should happen :
Nothing, everything should work

Solution :
add "Local" before "Static in ArrayDisplay_SortArrayStruct

	Local Static $hDll = DllOpen("kernel32.dll")
	Local Static $hDllComp = DllOpen("shlwapi.dll")

If main script doesn't declare $hDll as const, nothing bad happen, each $hDll keep its value, so i think it's more a "false positive" from AU3Check

it only happen if Global Const $hDll = 0 is BEFORE Array.au3 include

Attachments (0)

Change History (1)

comment:1 by TommyDDR, on Apr 20, 2026 at 1:57:08 PM

(Forgot my username)

Modify Ticket

Action
as new The ticket will remain with no owner.

Add Comment


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