Skip to content

Commit 4abd511

Browse files
authored
Merge pull request #48 from WowieMan/main
Fixes an issue with the covertTime function
2 parents e2607f2 + 6900ee4 commit 4abd511

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

InfiniLink/Music/MusicController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class MusicController {
104104
}
105105

106106
func convertTime(value: Double) -> [UInt8] {
107-
let val32 : UInt32 = UInt32(floor(value))
107+
var val32 : UInt32 = UInt32(0); if value < Double(UInt32.max) && Double(UInt32.max) >= 0.0 {val32 = UInt32(floor(value))}
108108

109109
let byte1 = UInt8(val32 & 0x000000FF)
110110
let byte2 = UInt8((val32 & 0x0000FF00) >> 8)

0 commit comments

Comments
 (0)