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