lib/digest/crc16_qt.rb in digest-crc-0.4.0 vs lib/digest/crc16_qt.rb in digest-crc-0.4.1
- old
+ new
@@ -20,10 +20,10 @@
# The data to update the checksum with.
#
def update(data)
data.each_byte do |b|
b = revert_byte(b) if REVERSE_DATA
- @crc = ((TABLE[((@crc >> 8) ^ b) & 0xff] ^ (@crc << 8)) & 0xffff)
+ @crc = ((@table[((@crc >> 8) ^ b) & 0xff] ^ (@crc << 8)) & 0xffff)
end
return self
end