Skip to content

Commit d86cee8

Browse files
committed
fix(bytecode reader): page numbers weren't correctly counted in --only-names mode
1 parent 3405fc0 commit d86cee8

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Fixed
1010
- the REPL doesn't color `import` in two colors (red for `imp__t` and blue for `___or_`), it keeps the first color that matched (red for import here)
11+
- page numbers are correctly counted when using the bytecode reader with '--only-names', instead of displaying `0` every time
1112

1213
### Changed
1314

src/arkreactor/Compiler/BytecodeReader.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,8 @@ namespace Ark
661661
if (displayCode)
662662
fmt::print("NOP");
663663
}
664-
else if (cPage.value_or(pp) == pp)
664+
else if (cPage.value_or(pp) == pp && segment != BytecodeSegment::HeadersOnly)
665665
{
666-
if (segment == BytecodeSegment::HeadersOnly)
667-
continue;
668666
if (sStart.has_value() && sEnd.has_value() && ((sStart.value() > page.size()) || (sEnd.value() > page.size())))
669667
{
670668
fmt::print(fmt::fg(fmt::color::red), "Slice start or end can't be greater than the segment size: {}\n", page.size());

0 commit comments

Comments
 (0)