This commit is contained in:
Bung 2022-12-16 15:01:15 +08:00 • committed by GitHub
commit a9bd78d579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 140 additions and 140 deletions

View file

@ -44,7 +44,7 @@ proc hexbyte*(hex: char): int {.inline.} =
proc parseOid*(str: cstring): Oid =
## Parses an OID.
var bytes = cast[cstring](cast[pointer](cast[ByteAddress](addr(result.time)) + 4))
var bytes = cast[cstring](cast[pointer](cast[int](addr(result.time)) + 4))
var i = 0
while i < 12:
bytes[i] = chr((hexbyte(str[2 * i]) shl 4) or hexbyte(str[2 * i + 1]))
@ -57,7 +57,7 @@ proc `$`*(oid: Oid): string =
result.setLen 24
var o = oid
var bytes = cast[cstring](cast[pointer](cast[ByteAddress](addr(o)) + 4))
var bytes = cast[cstring](cast[pointer](cast[int](addr(o)) + 4))
var i = 0
while i < 12:
let b = bytes[i].ord