- fixed problem encoding OID with arc values 0

pull/228/head
Michael Zillgith 5 years ago
parent d798814fb4
commit 97e65d5743

@ -436,6 +436,10 @@ BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufL
int requiredBytes = 0;
if (val == 0) {
buffer[encodedBytes++] = 0;
}
else {
int val2 = val;
while (val2 > 0) {
requiredBytes++;
@ -459,5 +463,7 @@ BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufL
}
}
}
return encodedBytes;
}

Loading…
Cancel
Save