Fixed an integer limit error causing an endless loop in the UUID block creation
This commit is contained in:
parent
0cf6d731c2
commit
2923d292bf
|
@ -13,8 +13,8 @@ techreg_uuid_block_s techreg_get_uuid_block(techreg_subsystem_e owner, u16_t num
|
|||
block.first_unassigned = 0;
|
||||
usz_t num_assignments = num_slots * 512;
|
||||
block.assignments = malloc(sizeof(u16_t) * num_assignments);
|
||||
for(u16_t assignment_index = 0; assignment_index < num_assignments; ++assignment_index)
|
||||
techreg_uuid_block_counter_g += assignment_index + 1;
|
||||
for(u32_t assignment_index = 0; assignment_index < num_assignments; ++assignment_index)
|
||||
block.assignments[assignment_index] = assignment_index + 1;
|
||||
block.assignments[num_assignments-1] = 0;
|
||||
|
||||
return block;
|
||||
|
|
Loading…
Reference in New Issue