mirror of https://github.com/AxioDL/metaforce.git
CTevCombiners: I overlooked a possible buffer overrun, fix it by using `maxTevStages` instead of `ERglTevStage::MAX`
This commit is contained in:
parent
791b1fa598
commit
eb17b8061d
|
@ -95,8 +95,8 @@ bool SetPassCombiners(ERglTevStage stage, const CTevPass& pass) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RecomputePasses() {
|
void RecomputePasses() {
|
||||||
sNumEnabledPasses = 1 - static_cast<int>(sValidPasses[1]);
|
sNumEnabledPasses = 1 - static_cast<int>(sValidPasses[maxTevPasses - 1]);
|
||||||
for (u32 i = sNumEnabledPasses; i < u32(ERglTevStage::MAX); ++i) {
|
for (u32 i = sNumEnabledPasses; i < maxTevPasses; ++i) {
|
||||||
aurora::gfx::disable_tev_stage(ERglTevStage(i));
|
aurora::gfx::disable_tev_stage(ERglTevStage(i));
|
||||||
}
|
}
|
||||||
// CGX::SetNumTevStages(sNumEnabledPasses);
|
// CGX::SetNumTevStages(sNumEnabledPasses);
|
||||||
|
|
Loading…
Reference in New Issue