Skip to content

Conversation

FineFindus
Copy link
Contributor

@FineFindus FineFindus commented Apr 2, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

If the challenge data array is of size one, the second element is accessed, leading to an IndexOutOfBoundsException. I assume, that this is a typo, as the JS version did correctly access the first element.

Fixes the following issue(s)

Due diligence

Fixes a regression, where if the challenge data array size was one, the second element
would be accessed, leading to a crash.
This was introduced when porting the challenge parsing from JS to
Kotlin.

Ref: TeamNewPipe@53b599b
@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Apr 2, 2025
@ShareASmile ShareASmile added bug Issue is related to a bug youtube Service, https://www.youtube.com/ labels Apr 8, 2025
Copy link

sonarqubecloud bot commented Apr 8, 2025

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

@Stypox Stypox merged commit 5840d3a into TeamNewPipe:dev Apr 8, 2025
8 checks passed
@FineFindus FineFindus deleted the fix/potoken-index branch April 8, 2025 21:06
@Stypox Stypox mentioned this pull request Jul 17, 2025
11 tasks
whistlingwoods pushed a commit to whistlingwoods/FoxPipe that referenced this pull request Jul 27, 2025
[YouTube] Access first element if array size is one
whistlingwoods pushed a commit to whistlingwoods/FoxPipe that referenced this pull request Oct 6, 2025
[YouTube] Access first element if array size is one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug size/small PRs with less than 50 changed lines youtube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants