mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Reject zero-vertex-count draws.
I thought all the code was safe against it, but it isn't.
This commit is contained in:
parent
5b0e82115e
commit
f22249cef5
1 changed files with 4 additions and 0 deletions
|
@ -910,6 +910,10 @@ bool DrawEngineCommon::SubmitPrim(const void *verts, const void *inds, GEPrimiti
|
|||
if ((vertexCount < 2 && prim > 0) || (prim > GE_PRIM_LINE_STRIP && prim != GE_PRIM_RECTANGLES)) {
|
||||
return false;
|
||||
}
|
||||
if (vertexCount <= 0) {
|
||||
// Unfortunately we need to do this check somewhere since GetIndexBounds doesn't handle zero-length arrays.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool applySkin = (vertTypeID & GE_VTYPE_WEIGHT_MASK) && decOptions_.applySkinInDecode;
|
||||
|
|
Loading…
Add table
Reference in a new issue