Skip to content

Comments

Fix out-by-one error#5790

Merged
dmarcos merged 1 commit intoaframevr:masterfrom
diarmidmackenzie:issue-5789
Feb 21, 2026
Merged

Fix out-by-one error#5790
dmarcos merged 1 commit intoaframevr:masterfrom
diarmidmackenzie:issue-5789

Conversation

@diarmidmackenzie
Copy link
Contributor

@diarmidmackenzie diarmidmackenzie commented Feb 5, 2026

Description:

As described in issue #5789

Changes proposed:

Fix out by 1 error, so pixel row 0 swaps with row (height -1) not (height) and vice-versa.
Also simplified code & reduced calculations by pre-computing the start and end indices.

Testing

  • "screenshot" UTs run clean. They don't test in enough detail to notice any change.
  • Live.

Before fix: I took a screenshot from the Anime UI example and opened in Paint. You can see a single layer of blank pixels at the top of the image:

image

After fix: no blank row of pixels at the top or bottom of the image:

image image

@diarmidmackenzie diarmidmackenzie marked this pull request as draft February 5, 2026 15:24
@diarmidmackenzie diarmidmackenzie marked this pull request as ready for review February 5, 2026 15:24
@arpu
Copy link
Contributor

arpu commented Feb 18, 2026

works

@dmarcos
Copy link
Member

dmarcos commented Feb 21, 2026

Thanks!

@dmarcos dmarcos merged commit d2e9475 into aframevr:master Feb 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants