Skip to content

Commit

Permalink
Modify the conditions of the judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuguohua committed Jan 12, 2024
1 parent 4371300 commit 026a706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos/2d/renderer/static-vb-accessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class StaticVBAccessor extends BufferAccessor {

public allocateChunk (vertexCount: number, indexCount: number): StaticVBChunk | null {
const byteLength = vertexCount * this.vertexFormatBytes;
if (vertexCount <= this._vCount || indexCount < this._iCount) {
if (vertexCount > this._vCount || indexCount > this._iCount) {
errorID(9004, byteLength);
return null;
}
Expand Down

0 comments on commit 026a706

Please sign in to comment.