Opened 11 years ago

Closed 11 years ago

#2437 closed Bug (Wont Fix)

IniWriteSection does not sufficiently control the "data" parameter.

Reported by: helloyou_tos_jg@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: IniWriteSection Cc:


For this code :

IniWriteSection (@ScriptDir & "\myIni.ini", "MySection", "MyKey1=MyValues2" & @LF & "MyKey2")

the return should be 0 and @error = 1 because the data format is invalid.

For this code :

IniWriteSection ($ini, "MySection", "MyKey1=MyValue1" & @LF & "MyKey1=MyValue2")

the MyKey1 should not be written two times.

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by Mat

No issue here in the example, as an ini file will still work when multiple keys have the same name (the first defined value will be returned by IniRead, so MyValue1). If you want unique keys then this is up to the programmer to implement.

However, absolutely no checking is done on the string format at all, so completely invalid strings can still be written. That is more of an issue.

I still believe it is up to programmer to make sure the data they are writing is correct though.

comment:2 Changed 11 years ago by helloyou_tos_jg@…

Thank for this fast answer.
It's not a problem to check to format (for me).
Maybe you can add a remark in the helpfile about this.
Good luck

comment:3 Changed 11 years ago by Jon

  • Resolution set to Wont Fix
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.