Artifact
1f9c70a378ff2dde064930cf34c36094cca06d57:
Attachment "crc_bug.tcl" to
ticket [3477684fff]
added by
tmmenezes
2012-01-23 18:35:19.
# 'set tcl_patchLevel' -> 8.4.19
# 'package require crc16' -> 1.1.1
# Calculating the CRC of a **binary** text string
package require crc16
set test_hex {2d00}
# convert string in hexadecimal to binary
catch {binary format H* $test_hex} bin
# output to stdout: notice that the converted string includes '- '
puts '$bin'
# '- ' is wrongly seen by crc as an option, not the string for CRC...
crc::crc-ccitt $bin