We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc21554 commit af677a5Copy full SHA for af677a5
lib/net/ber/core_ext/fixnum.rb
@@ -48,11 +48,11 @@ def to_ber_internal
48
size -= 1
49
end
50
51
- # for positive integers, if most significant bit is set to one,
+ # for positive integers, if most significant bit in an octet is set to one,
52
# pad the result (otherwise it's decoded as a negative value)
53
# See section 8.5 of ITU-T X.690:
54
# http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
55
- if self > 0 && (self & (0b10000000 << (size - 1))) > 0
+ if self > 0 && (self & (0b10000000 << (size - 1) * 8)) > 0
56
size += 1
57
58
0 commit comments