Skip to content

Commit

Permalink
Display strings with numbers primarily as strings (redballoonsecurity…
Browse files Browse the repository at this point in the history
…#423)

* Display strings with numbers primarily as strings

* Update CHANGELOG
  • Loading branch information
rbs-jacob authored and ANogin committed May 30, 2024
1 parent d4ff0fa commit 2880879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/src/utils/StructuredList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
}
return Object.fromEntries(obj);
} else if (typeof object === "string") {
if (/^-?\d+$/.test(obj)) {
return parseInt(obj);
}
}
}
Expand All @@ -37,6 +33,9 @@
{object}
{:else if typeof object === "string" && !noQuotes}
"{object}"
{#if /^-?\d+$/.test(object)}
(0x{parseInt(object).toString(16)})
{/if}
{:else if typeof object === "object" && Object.keys(object).length === 0}
None
{:else if typeof object === "object"}
Expand Down
1 change: 1 addition & 0 deletions ofrak_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix running scripts without a project selected, and without a config selected. ([#407](https://github.com/redballoonsecurity/ofrak/pull/407))
- Fix bug in OFRAK GUI server which causes an error when parsing a default config value of bytes. ([#409](https://github.com/redballoonsecurity/ofrak/pull/409))
- Set default fallback font to system default monospace, instead of variable-width sans-serif. ([#422](https://github.com/redballoonsecurity/ofrak/pull/422))
- View resource attribute string values containing only digits primarily as strings, alternatively as hex numbers. ([#423](https://github.com/redballoonsecurity/ofrak/pull/423))

### Changed
- Change `FreeSpaceModifier` & `PartialFreeSpaceModifier` behavior: an optional stub that isn't free space can be provided and fill-bytes for free space can be specified. ([#409](https://github.com/redballoonsecurity/ofrak/pull/409))
Expand Down

0 comments on commit 2880879

Please sign in to comment.