mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-18 13:21:33 +00:00
Avoid a bad buffer access on GE_PRIM_KEEP_PREVIOUS.
This commit is contained in:
parent
eaa4743285
commit
340029f333
@ -40,13 +40,13 @@ void IndexGenerator::Reset() {
|
||||
}
|
||||
|
||||
bool IndexGenerator::PrimCompatible(int prim1, int prim2) {
|
||||
if (prim1 == -1)
|
||||
if (prim1 == GE_PRIM_INVALID || prim2 == GE_PRIM_KEEP_PREVIOUS)
|
||||
return true;
|
||||
return indexedPrimitiveType[prim1] == indexedPrimitiveType[prim2];
|
||||
}
|
||||
|
||||
bool IndexGenerator::PrimCompatible(int prim) const {
|
||||
if (prim_ == GE_PRIM_INVALID)
|
||||
if (prim_ == GE_PRIM_INVALID || prim == GE_PRIM_KEEP_PREVIOUS)
|
||||
return true;
|
||||
return indexedPrimitiveType[prim] == prim_;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user