forked from cellular-infrastructure/osmo-pcu
csn1: fix existNextElement(): use bitvec_get_bit_pos()
As was discovered recently (see OS#4388), bitvec_read_field() would never return a negative value because its return type is unsigned (uint64_t). We don't really need to get more than one bit, so let's just use the bitvec_get_bit_pos() instead. Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Related: OS#4388
This commit is contained in:
parent
fa5f91c05f
commit
74bc150ab2
|
@ -137,7 +137,7 @@ static gint16 ProcessError_impl(const char *file, int line, unsigned readIndex,
|
|||
static gboolean
|
||||
existNextElement(bitvec *vector, unsigned& readIndex, guint8 Tag)
|
||||
{
|
||||
guint8 res = bitvec_read_field(vector, &readIndex, 1);
|
||||
int res = bitvec_get_bit_pos(vector, readIndex++);
|
||||
if (Tag == STANDARD_TAG)
|
||||
{
|
||||
return (res > 0);
|
||||
|
|
Loading…
Reference in New Issue