[ox/mc] Fix VLI encoding to handle negatives

This commit is contained in:
2019-03-16 14:41:43 -05:00
parent a9b7b00011
commit e4aab88831
3 changed files with 39 additions and 23 deletions

View File

@@ -142,7 +142,6 @@ Error MetalClawWriter::appendInteger(I val) {
if (val) {
if (m_buffIt + sizeof(I) < m_buffLen) {
LittleEndian<I> leVal = val;
mc::encodeInteger(val);
// bits needed to represent number factoring in space possibly needed
// for signed bit
const auto bits = mc::highestBit(val) + (ox::is_signed<I> ? 1 : 0) / 8;