Skip to content

Commit

Permalink
fix: size of _texCoordStatus is not enough
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 authored May 9, 2024
1 parent c9a5947 commit dd1e1b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Internal/MeshInfo2/MeshInfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class MeshInfo2
private readonly Mesh _originalMesh;

// TexCoordStatus which is 3 bits x 8 = 24 bits
private ushort _texCoordStatus;
private uint _texCoordStatus;

public readonly List<SubMesh> SubMeshes = new List<SubMesh>(0);

Expand Down Expand Up @@ -412,7 +412,7 @@ public TexCoordStatus GetTexCoordStatus(int index)
public void SetTexCoordStatus(int index, TexCoordStatus value)
{
_texCoordStatus = (ushort)(
(uint)_texCoordStatus & ~(TexCoordStatusMask << (BitsPerTexCoordStatus * index)) |
_texCoordStatus & ~(TexCoordStatusMask << (BitsPerTexCoordStatus * index)) |
((uint)value & TexCoordStatusMask) << (BitsPerTexCoordStatus * index));
}

Expand Down

0 comments on commit dd1e1b8

Please sign in to comment.