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

fix: chance of out of bounds in model317 #18

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

lesleyrs
Copy link
Contributor

calling axis.g2 sometimes causes RangeError: Offset is outside the bounds of the DataView at DataView.prototype.getUint16 (<anonymous>)

317 client doesn't multiply by 6 here:

        buf0.position = header.faceTextureAxisOffset;

        for (int face = 0; face < texturedFaceCount; face++) {
            texturedVertexA[face] = buf0.readU16();
            texturedVertexB[face] = buf0.readU16();
            texturedVertexC[face] = buf0.readU16();
        }

@ultraviolet-jordan
Copy link
Collaborator

We should not be modifying the 225 vanilla client code in ObjType.

@lesleyrs
Copy link
Contributor Author

Restored it

@ultraviolet-jordan ultraviolet-jordan merged commit 21d81ee into 2004Scape:main Jul 23, 2024
2 checks passed
@lesleyrs lesleyrs deleted the oob branch July 23, 2024 01:21
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.

2 participants