cereal icon indicating copy to clipboard operation
cereal copied to clipboard

fix defer variable corruption

Open rajashekar007 opened this issue 3 years ago • 1 comments

As deferements are iterated using range based loop, when there is a recursive defer, it's corrupting the variable. The loop iteration has been changed to use index based to fix the same.

Kindly review it.

rajashekar007 avatar Aug 10 '22 10:08 rajashekar007

This strikes me as likely an incorrect usage of cereal::defer - it shouldn't be used in situations where there is any recursive structure to serialize as this defeats the purpose of the deferment in the first place.

AzothAmmo avatar Apr 24 '23 03:04 AzothAmmo