Modify

Opened 2 years ago

Last modified 3 months ago

#4005 assigned Bug

Empty ReDim make Autoit crash

Reported by: Pickwy Owned by: Jon
Milestone: Component: AutoIt
Version: 3.3.16.1 Severity: None
Keywords: redim crash Cc: admin@…

Description

Observed : Using the empty brackets syntax with ReDim hard crash the interpreter.
Expected : Runtime error or no change to Array

Local $Dummy[] = [1, 2, 3]
ReDim $Dummy ;Do nothing at all
ReDim $Dummy[] ;Crash

Attachments (0)

Change History (5)

comment:1 by mLipok, 23 months ago

Issue confirmed.

IMHO: AutoIt should throw AutoIt error something like:
Array ReDim has not set number of subscripts.

comment:2 by Andreik, 23 months ago

Both ReDim throw a syntax error in SciTe. What do you expect more?

in reply to:  2 comment:3 by Jos, 23 months ago

Replying to Andreik:

Both ReDim throw a syntax error in SciTe. What do you expect more?

AutoIt3 shouldn't hard crash.

comment:4 by Andreik, 23 months ago

I understand and it should be treated more elegant as a runtime error. My point was if you write invalid code then it's a high chance to get bad or unexpected behavior. By the way, are you allowed to compile from SciTe if you have syntax errors?

comment:5 by J-Paul Mesnage, 3 months ago

Owner: set to Jon
Status: newassigned

Fix sent to Jon

Modify Ticket

Action
as assigned The owner will remain Jon.

Add Comment


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