Properly encode bitstrings with no values set.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5365 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2012-12-20 14:47:04 +00:00
parent 5a3e68901b
commit e17c2f1950
1 changed files with 1 additions and 1 deletions

View File

@ -973,7 +973,7 @@ DataBlock ASNLib::encodeBitString(String val, bool tagCheck)
DataBlock contents;
int l = val.length();
uint8_t trail = 8 - l % 8;
uint8_t trail = (-l) & 0x07;
for (int i = 0; i < trail; i++)
val += "0";
contents.append(&trail, 1);