Merge pull request #104 from jangler/master
Don't write NUL bytes in uncompressed_memcopy()
This commit is contained in:
commit
19c9a00bca
|
@ -335,7 +335,7 @@ func uncompressed_memcopy(w io.Writer, asset *Asset, r io.Reader) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if utf8.Valid(b) {
|
||||
if utf8.Valid(b) && !bytes.Contains(b, []byte{0}) {
|
||||
fmt.Fprintf(w, "`%s`", sanitize(b))
|
||||
} else {
|
||||
fmt.Fprintf(w, "%+q", b)
|
||||
|
|
Loading…
Reference in New Issue
Block a user