Closed kelbon closed 2 years ago
https://github.com/landelare/ue5coro/blob/ec6f8c644cd46ad6ff0cdd2fc68d068dd3fd2d0f/Source/UE5Coro/Public/UE5Coro/Generator.h#L190
co_yield float{} in generator ==> your promise saves pointer to float value in void, so next step .Current() returns reference to int, but float under it! And dont use static cast with void please!
Thank you for the bug report, it will be fixed in 1.2. What's wrong with static_cast?
static_cast
https://github.com/landelare/ue5coro/blob/ec6f8c644cd46ad6ff0cdd2fc68d068dd3fd2d0f/Source/UE5Coro/Public/UE5Coro/Generator.h#L190
co_yield float{} in generator ==> your promise saves pointer to float value in void, so next step .Current() returns reference to int, but float under it! And dont use static cast with void please!