marrub
/
grope
Archived
1
0
Fork 0

fix chunks being overridden on write

master
an 2018-11-11 07:40:50 -05:00
parent 6380e438eb
commit f974a538a9
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ impl Stuff
for b in &d_i32b(self.p.0) {c.dat.push(*b)}
for b in &d_i32b(self.p.1) {c.dat.push(*b)}
if let Some(n) = png.find_chunk(*b"grAb") {png.chnk[n] = c}
else {png.chnk[1] = c}
else {png.chnk.insert(1, c)}
png.write(&mut File::create(fname)?)?;
Ok(())
}