summaryrefslogtreecommitdiffstats
path: root/ruby/micronucleus.rb
diff options
context:
space:
mode:
authorBluebie <a@creativepony.com>2012-10-05 10:09:55 +1000
committerBluebie <a@creativepony.com>2012-10-05 10:09:55 +1000
commit22d16fbdeddba74eab24c3cec7f085e3af8ad5af (patch)
treeb03ff9f25328a50784316834026ed6a268b16c87 /ruby/micronucleus.rb
parent2c5da5576872ffe24a0cb237fb87926da060b961 (diff)
downloadmicronucleus-22d16fbdeddba74eab24c3cec7f085e3af8ad5af.tar.gz
micronucleus-22d16fbdeddba74eab24c3cec7f085e3af8ad5af.tar.bz2
micronucleus-22d16fbdeddba74eab24c3cec7f085e3af8ad5af.zip
ruby: Added better logging to HexProgram
Diffstat (limited to 'ruby/micronucleus.rb')
-rw-r--r--ruby/micronucleus.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby/micronucleus.rb b/ruby/micronucleus.rb
index 7dfafbd..95ddb2f 100644
--- a/ruby/micronucleus.rb
+++ b/ruby/micronucleus.rb
@@ -157,7 +157,7 @@ class HexProgram
checksum_calculated = (((checksum_calculated % 256) ^ 0xFF) + 1) % 256
- raise "Hex file checksum mismatch @ #{line}" unless checksum == checksum_calculated
+ raise "Hex file checksum mismatch @ #{line} should be #{checksum_calculated.to_s(16)}" unless checksum == checksum_calculated
if record_type == 0 # data record
data_bytes = data.chars.each_slice(2).map { |slice| slice.join('').to_i(16) }