NIBBLETYPE is defined as an unsigned char, so we can never have a value less than 0, so I added that line in so any overflow values would be changed to zero. This effectively clamps it to 0 .. 15.