Skip to content

Commit 779394a

Browse files
committed
Corrected operator combining background and character
1 parent dd3bc1a commit 779394a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Curses.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ internal class Curses {
166166
func backgroundSet(windowHandle:UnsafeMutablePointer<WINDOW>, attributeValue:Int, character:Character) {
167167
let unicodeScalars = character.unicodeScalars
168168
let ascii = UInt(unicodeScalars[unicodeScalars.startIndex].value)
169-
let attributeAndCharacter : UInt = UInt(attributeValue) + ascii
169+
let attributeAndCharacter : UInt = UInt(attributeValue) | ascii
170170
CNCURSES.wbkgd(windowHandle, attributeAndCharacter)
171171
}
172172

0 commit comments

Comments
 (0)