OriginalBugID: 3229 Bug
Version: 8.0.4
SubmitDate: '1999-10-28'
LastModified: '1999-11-08'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 3466
OS: Linux
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '1999-11-08'
Name:
Bob Findlay
ReproducibleScript:
#!/usr/bin/tclsh
set bob1 0x8000
set bob2 [binary format "s1" $bob1]
binary scan $bob2 s1 bob3
puts stdout [format "bob1=%X bob3=%X" $bob1 $bob3]
ObservedBehavior:
It seems once the lead bit in a 16 bit integer is set the binary
scan command seems to prepend the result with 0xffff
This does not seem like the correct behavior.
DesiredBehavior:
I would have expected that binary scan would return with the 16 bit
value
without the prepended 0xffff
|