Replace magic number with variable

This commit is contained in:
Yasuhiro Hatta 2016-10-23 02:22:07 +09:00
parent ac6d663703
commit 40e34fc990
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ internal class BinaryReader {
if length < 0 {
throw CSVError.streamErrorHasOccurred(error: stream.streamError!)
}
if length != 4 {
if length != bufferSize {
throw CSVError.stringEncodingMismatch
}
return try UnsafePointer(buffer).withMemoryRebound(to: UInt32.self, capacity: 1) {