Modify

Opened 5 years ago

Closed 5 years ago

#3790 closed Bug (Fixed)

CharW() >= 64968 compares with "" as True

Reported by: Chimp Owned by: Jon
Milestone: 3.3.15.4 Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description

CharW() >= 64968 compares with "" as True. I think it shouldn't
Here a snippet to show the problem.

For $i = 64960 To 64975
        ConsoleWrite('chrw(' & $i & ') = "" ? --> ' & (ChrW($i) = '') & @TAB & @error & @CRLF)
Next

it results as:
chrw(64960) = "" ? --> False 0
chrw(64961) = "" ? --> False 0
chrw(64962) = "" ? --> False 0
chrw(64963) = "" ? --> False 0
chrw(64964) = "" ? --> False 0
chrw(64965) = "" ? --> False 0
chrw(64966) = "" ? --> False 0
chrw(64967) = "" ? --> False 0
chrw(64968) = "" ? --> True 0
chrw(64969) = "" ? --> True 0
chrw(64970) = "" ? --> True 0
chrw(64971) = "" ? --> True 0
chrw(64972) = "" ? --> True 0
chrw(64973) = "" ? --> True 0
chrw(64974) = "" ? --> True 0
chrw(64975) = "" ? --> True 0

P.S.
(a workaround) As answered in the post at the following link in the forum, the problem doesn't arise if we compare using == instead of =
https://www.autoitscript.com/forum/topic/204398-why-charw-64967-compares-as-an-empty-string/?do=findComment&comment=1468690

Attachments (0)

Change History (2)

comment:1 by J-Paul Mesnage, 5 years ago

Owner: set to J-Paul Mesnage
Status: newassigned

Fix sent to Jon
the comparison was stop at the first null string
now if strings have different size they are taken in account to differentiate the strings insensitive case comparison.
BTW the insansitive string comparison always stop at the first nul char. Be carefull !!!

comment:2 by Jon, 5 years ago

Milestone: 3.3.15.4
Owner: changed from J-Paul Mesnage to Jon
Resolution: Fixed
Status: assignedclosed

Fixed by revision [12560] in version: 3.3.15.4

Modify Ticket

Action
as closed 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.