mirror of
https://github.com/G2-Games/lbee-utils.git
synced 2025-04-19 15:22:53 -05:00
Fixed saving file with unusual offset value
This commit is contained in:
parent
c6404f6a09
commit
a93ba81859
1 changed files with 2 additions and 2 deletions
|
@ -279,12 +279,12 @@ impl Pak {
|
||||||
|
|
||||||
for entry in self.entries() {
|
for entry in self.entries() {
|
||||||
//let block_size = entry.data.len().div_ceil(self.header().block_size as usize);
|
//let block_size = entry.data.len().div_ceil(self.header().block_size as usize);
|
||||||
let mut remainder = 2048
|
let mut remainder = self.header().block_size as usize
|
||||||
- entry
|
- entry
|
||||||
.data
|
.data
|
||||||
.len()
|
.len()
|
||||||
.rem_euclid(self.header().block_size as usize);
|
.rem_euclid(self.header().block_size as usize);
|
||||||
if remainder == 2048 {
|
if remainder == self.header().block_size as usize {
|
||||||
remainder = 0;
|
remainder = 0;
|
||||||
}
|
}
|
||||||
output.write_all(&entry.data)?;
|
output.write_all(&entry.data)?;
|
||||||
|
|
Loading…
Reference in a new issue