Don't write NUL bytes in uncompressed_memcopy()

pull/4/head
Brandon Mulcahy 2015-07-28 07:21:58 -04:00
parent 14ba83ac84
commit 96e3c9c230
1 changed files with 1 additions and 1 deletions

View File

@ -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)