mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
Fix a possibly uninitialized variable
This commit is contained in:
parent
9e7143d934
commit
5348708da4
1 changed files with 4 additions and 0 deletions
4
ir.c
4
ir.c
|
@ -1665,6 +1665,10 @@ bool ir_function_allocate_locals(ir_function *self)
|
|||
if (!function_allocator_positions_add(&alloc, 0))
|
||||
goto error;
|
||||
|
||||
if (alloc.sizes_count)
|
||||
pos = alloc.positions[0] + alloc.sizes[0];
|
||||
else
|
||||
pos = 0;
|
||||
for (i = 1; i < alloc.sizes_count; ++i)
|
||||
{
|
||||
pos = alloc.positions[i-1] + alloc.sizes[i-1];
|
||||
|
|
Loading…
Reference in a new issue