|
2018-07-26
| ||
| 16:18 | • Closed ticket [ba921a8d98]: concatenating binary array with empty string yields ... artifact: 5c13b2113b user: dgp | |
| 16:14 | [ba921a8d98] Make sure [string cat] includes all data from all bytearrays. check-in: 9819e2fe99 user: dgp tags: core-8-branch | |
|
2018-07-25
| ||
| 21:34 | • Ticket [ba921a8d98] concatenating binary array with empty string yields the empt... artifact: 889ec81176 user: anonymous | |
| 19:27 | • Ticket [ba921a8d98]: 3 changes artifact: b8ade3a8de user: dgp | |
|
2018-07-22
| ||
| 20:46 | • Ticket [ba921a8d98]: 3 changes artifact: 0f28248863 user: pooryorick | |
| 20:44 | Fix for [ba921a8d98e02a96] - concatenating binary array with empty string yields the empty string. check-in: f274e1f1ba user: pooryorick tags: core-8-branch | |
| 20:35 | • New ticket [ba921a8d98] concatenating binary array with empty string yields the ... artifact: df672682d1 user: pooryorick | |
concatenating binary array with empty string yields the empty string
Closed / Fixedba921a8d98e02a96617835bfdc3437e2a4db9e1bCreated 8 years agoUpdated 8 years ago
Descriptionwiki2018-07-22 20:35:20
The result of the following script is the empty string:
proc main {} {
set data [binary format a* hello]
puts $data
puts $data[set data {}]
}
main
Referenced by1
9819e2fe99[ba921a8d98] Make sure [string cat] includes all data from all bytearrays. check-in2018-07-26 16:14:44
pooryorickwiki2018-07-22 20:46:33
Fixed in [f274e1f1baf02516].
dgpplain2018-07-25 19:27:40
Fix isn't right yet:
% proc demo {} {
set data [binary format a* hello]
return [encoding convertto $data]$data
}
% demo
hellolr
%
anonymoushtml2018-07-25 21:34:47
Just for the records, a variant of the original snippet without [puts]:
proc main {} {
set data [binary format a* hello]
return [expr {$data}][set data {}]
}
main
dgpplain2018-07-26 16:18:17
Test and fix committed.
Log in (anonymous is fine) to add a comment.