1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00

Try to use the correct return value when seeking.

This commit is contained in:
Rob Rix 2015-10-27 11:33:18 -04:00
parent f2b52a0620
commit c23f62d9cf

View File

@ -14,7 +14,7 @@ extension TSInput {
return UnsafePointer<Int8>(string)
},
seek_fn: { (payload: UnsafeMutablePointer<Void>, position: TSLength) -> Int32 in
fseek(UnsafeMutablePointer<FILE>(payload), position.bytes, SEEK_CUR)
fseek(UnsafeMutablePointer<FILE>(payload), position.bytes, SEEK_CUR) == 0 ? 1 : 0
})
}
}