Skip to content

Commit

Permalink
Fix not recognizing sections that don't start with dots
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Feb 24, 2024
1 parent 550fdeb commit 0d739f5
Show file tree
Hide file tree
Showing 4 changed files with 2,373 additions and 2,353 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix not recognizing sections that don't start with dots (`.`).

## [2.3.5] - 2024-02-04

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/rs/mapfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl MapFile {
*/
pub fn parse_map_contents_gnu(&mut self, map_contents: String) {
// TODO: maybe move somewhere else?
let regex_file_data_entry = Regex::new(r"^\s+(?P<section>\.[^\s]+)\s+(?P<vram>0x[^\s]+)\s+(?P<size>0x[^\s]+)\s+(?P<name>[^\s]+)$").unwrap();
let regex_file_data_entry = Regex::new(r"^\s+(?P<section>[^*][^\s]+)\s+(?P<vram>0x[^\s]+)\s+(?P<size>0x[^\s]+)\s+(?P<name>[^\s]+)$").unwrap();
let regex_function_entry =
Regex::new(r"^\s+(?P<vram>0x[^\s]+)\s+(?P<name>[^\s]+)$").unwrap();
// regex_function_entry = re.compile(r"^\s+(?P<vram>0x[^\s]+)\s+(?P<name>[^\s]+)((\s*=\s*(?P<expression>.+))?)$")
Expand Down
Loading

0 comments on commit 0d739f5

Please sign in to comment.