- MMS: also update bitstring value when source bit string is of smaller size than the bitstring to be updated

pull/244/head
Michael Zillgith 5 years ago
parent 9c543470f6
commit 04f6b440c8

@ -258,6 +258,13 @@ MmsValue_update(MmsValue* self, const MmsValue* update)
case MMS_BIT_STRING:
if (self->value.bitString.size == update->value.bitString.size)
memcpy(self->value.bitString.buf, update->value.bitString.buf, bitStringByteSize(self));
else if (update->value.bitString.size < self->value.bitString.size) {
int i;
for (i = 0; i < update->value.bitString.size; i++) {
MmsValue_setBitStringBit(self, i, MmsValue_getBitStringBit(update, i));
}
}
else
return false;
break;

Loading…
Cancel
Save