Modify

Opened 12 years ago

Closed 12 years ago

#229 closed Bug (Rejected)

@error and @extended not returning appropriate values for BinaryToString if input binary string contains 00

Reported by: steve8tch Owned by:
Milestone: Component: AutoIt
Version: 3.2.10.0 Severity: None
Keywords: BinaryToString Cc:

Description

I have done some testing. BinaryToString will return the a value up to when it sees the first "00" in the Binary String. The problem is @error still shows 0 - so the return value may or may not contain any values depending on the position of any "00" entries in the Binary string. We have no way to easily test the output from BinaryToString for any "00" values in input Binary String

;binary to string test
;Binary message consisting of a "length component" followed by the string part
$err = 99
$ext = 99
$bin_msg = "0x0000000548656C6C6F"
;To get hold of sting part of message I do this
$bin_str = "0x" & StringTrimLeft($bin_msg,10)
$rtn = BinaryToString($bin_str)
$err = @error
$ext = @extended
msgbox(0,"This works OK","$rtn = " & $rtn & @CRLF & "$err = " & $err & @CRLF & "$ext = " & $ext)
;This suggests that BinaryToString function is returning @error and @extended
; but...
$rtn = BinaryToString($bin_msg)
$err = @error
$ext = @extended
;This does not work - no error, no extended and actually causes Msgbox() to work incorrectly
msgbox(0,"Where are the $err and $ext entries ?","$rtn = " & $rtn & @CRLF & "$err = " & $err & @CRLF & "$ext = " & $ext)

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by Valik

I do not see any documented values for @error or @extended. So, what is your bug? Are you reporting that non-documented functionality doesn't work like you think it should?

comment:2 Changed 12 years ago by Jpm

You can use BinaryLen() and StringLen() if you want to know if the conversion has been stopped before end.

comment:3 Changed 12 years ago by Jpm

  • Resolution set to Rejected
  • 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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.