mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Reject zero-vertex-count draws.
I thought all the code was safe against it, but it isn't.
This commit is contained in:
1 parent
5b0e82115e
commit
f22249cef5
1 file changed
+4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user