commit | cc2bfbb20954f0be9237624b53feca0e27e88f72 | [log] [tgz] |
---|---|---|
author | Thiago Macieira <thiago.macieira@intel.com> | Sun Dec 17 23:38:37 2017 -0800 |
committer | Thiago Macieira <thiago.macieira@intel.com> | Sat Jan 13 14:37:40 2018 -0200 |
tree | 867c2deaf6317996337ac0a07c1242117fe430c4 | |
parent | d3c47d229633e3f3b3c3d0d01b872057d73f0487 [diff] |
Encoder: Change the way we reckon the number of items added Instead of counting forward the number of items added, which meant we couldn't know in cbot_encoder_close_container() whether we had added enough, let's count backwards. The number is offset by 1 so we should be at 1 if we added exactly as many items as we had expected to. Zero means we added too many. Any other number means we added too few. Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>