Skip to content

Commit

Permalink
Fix auto data subsegments not being split (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethteck authored Nov 30, 2024
1 parent 262a7e6 commit a5353ca
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# splat Release Notes

### 0.31.0

* Fix subsegments of auto `data` segments not being split.

### 0.30.1

* Fix `create_config` not handling unsafe path characters.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The brackets corresponds to the optional dependencies to install while installin
If you use a `requirements.txt` file in your repository, then you can add this library with the following line:

```txt
splat64[mips]>=0.30.1,<1.0.0
splat64[mips]>=0.31.0,<1.0.0
```

### Optional dependencies
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "splat64"
# Should be synced with src/splat/__init__.py
version = "0.30.1"
version = "0.31.0"
description = "A binary splitting tool to assist with decompilation and modding projects"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
2 changes: 1 addition & 1 deletion src/splat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__package_name__ = __name__

# Should be synced with pyproject.toml
__version__ = "0.30.1"
__version__ = "0.31.0"
__author__ = "ethteck"

from . import util as util
Expand Down
5 changes: 1 addition & 4 deletions src/splat/segtypes/common/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ def scan(self, rom_bytes: bytes):
self.disassemble_data(rom_bytes)

def split(self, rom_bytes: bytes):
if self.is_auto_segment:
return

super().split(rom_bytes)

if self.type.startswith(".") and not options.opts.disassemble_all:
Expand Down Expand Up @@ -73,7 +70,7 @@ def should_scan(self) -> bool:
return True

def should_split(self) -> bool:
return not self.type.startswith(".")
return True

def cache(self):
return [CommonSegCodeSubsegment.cache(self), CommonSegGroup.cache(self)]
Expand Down

0 comments on commit a5353ca

Please sign in to comment.