Skip to content

Commit

Permalink
Fix bug in hex encoding of normalized constraint hashes (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne authored Nov 9, 2022
1 parent cce41a9 commit 336a922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/MySQLKit/MySQLDialect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ public struct MySQLDialect: SQLDialect {
fileprivate let hexTable: [UInt8] = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66]
extension Sequence where Element == UInt8 {
fileprivate var hexRepresentation: String {
.init(decoding: self.flatMap { [hexTable[Int($0 >> 4)], hexTable[Int($0 & 0x7)]] }, as: Unicode.ASCII.self)
.init(decoding: self.flatMap { [hexTable[Int($0 >> 4)], hexTable[Int($0 & 0xf)]] }, as: Unicode.ASCII.self)
}
}

0 comments on commit 336a922

Please sign in to comment.