Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Clean up. #20246

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Examples: Clean up. #20246

merged 1 commit into from
Sep 2, 2020

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 2, 2020

Resolved some linter issues.


let bufferPointer = 0;
let slashesCount = 0;
let word = '';
let currentByte = 0;
for ( let code, currentByte = 0; currentByte < length; currentByte ++ ) {
for ( let code; currentByte < length; currentByte ++ ) {
Copy link
Collaborator Author

@Mugen87 Mugen87 Sep 2, 2020

Choose a reason for hiding this comment

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

@kaisalmen I believe this was a bug. You have declared currentByte two times. Hence, the outer currentByte was always 0 which could potentially be a problem in the last call of _processLine() at the end of the method.

https://github.com/mrdoob/three.js/pull/20246/files#diff-0d91ee5a7e6fe5182c3ea5a4f747935eR387

Copy link
Contributor

Choose a reason for hiding this comment

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

True, thank you for spotting this.

@mrdoob mrdoob added this to the r121 milestone Sep 2, 2020
@mrdoob mrdoob merged commit 4c738e6 into mrdoob:dev Sep 2, 2020
@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2020

Thanks!

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.

None yet

3 participants