Skip to content

Commit

Permalink
Engine: fix incorrect loop condition in GetStackPtrOffsetRw()
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Dec 14, 2024
1 parent a818c1f commit 7c52e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Engine/script/cc_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@ RuntimeScriptValue ccInstance::GetStackPtrOffsetRw(const int32_t rw_offset)
{
int32_t total_off = 0;
RuntimeScriptValue *stack_entry = _registers[SREG_SP].RValue;
while (total_off < rw_offset && stack_entry >= _stackBegin)
while (total_off < rw_offset && stack_entry > _stackBegin)
{
stack_entry--;
total_off += stack_entry->Size;
Expand Down

0 comments on commit 7c52e35

Please sign in to comment.