- oops - add rangecheck to 'FlipLine'

This commit is contained in:
Rachael Alexanderson 2019-11-10 10:01:17 -05:00
parent 1098a13fdb
commit 57eb1a82d6

View file

@ -3665,13 +3665,16 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, FlipLine)
PARAM_SELF_PROLOGUE(DLevelPostProcessor); PARAM_SELF_PROLOGUE(DLevelPostProcessor);
PARAM_UINT(lineidx); PARAM_UINT(lineidx);
line_t *line = &self->Level->lines[lineidx]; if (lineidx < self->Level->lines.Size())
vertex_t *v1 = line->v1; {
vertex_t *v2 = line->v2; line_t *line = &self->Level->lines[lineidx];
vertex_t *v1 = line->v1;
vertex_t *v2 = line->v2;
line->v1 = v2; line->v1 = v2;
line->v2 = v1; line->v2 = v1;
}
self->loader->ForceNodeBuild = true; self->loader->ForceNodeBuild = true;
return 0; return 0;
} }