[Add] Sanity check to spfx_add()
This commit is contained in:
parent
4cac5ba5b2
commit
e2b8e738f5
@ -129,6 +129,11 @@ void spfx_add(int effect,
|
|||||||
SPFX* cur_spfx;
|
SPFX* cur_spfx;
|
||||||
double ttl, anim;
|
double ttl, anim;
|
||||||
|
|
||||||
|
if((effect < 0) || (effect > spfx_neffects)) {
|
||||||
|
WARN("Trying to add spfx with invalid effect!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Select the layer. */
|
/* Select the layer. */
|
||||||
if(layer == SPFX_LAYER_FRONT) {
|
if(layer == SPFX_LAYER_FRONT) {
|
||||||
/* Front layer. */
|
/* Front layer. */
|
||||||
|
Loading…
Reference in New Issue
Block a user