* src/psaux/psstack.c (cf2_stack_setReal): Fix off-by-one in index check.

Fixes #1428.
This commit is contained in:
Mateusz Jurczyk 2026-05-07 12:29:45 +00:00
parent b6bcd2177f
commit 1f705ffb71

View file

@ -211,7 +211,7 @@
CF2_UInt idx,
CF2_Fixed val )
{
if ( idx > cf2_stack_count( stack ) )
if ( idx >= cf2_stack_count( stack ) )
{
CF2_SET_ERROR( stack->error, Stack_Overflow );
return;