Skip to content

Commit

Permalink
Fixes #4 (Stray characters in stdout, stderr)
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Feb 13, 2017
1 parent 09c6716 commit 55c432b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Process/IO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private func _readToString(fd: FileDescriptor) throws -> String {
let data = try _read(fd: fd)
if data.count == 0 { return "" }

let str = String.init(cString: data.map({ UInt8($0)}))
let str = String.init(cString: data.map({ UInt8($0)}) + [0])
return str
}

Expand Down

0 comments on commit 55c432b

Please sign in to comment.