Repeat the following process to check the log output
const int64 min = 1000000000; const int64 max = 9999999999; const int64 x = FMath::RandRange(min, max); UE_LOG(LogTemp, Warning, TEXT("int64:%ld"), x);
Output will be "-1147483648" with high probability (71 out of 100 times).
TruncToInt64() should be used in RandHelper64() instead of TruncToInt().
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-193898 in the post.
2 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 5.2 |
Target Fix | 5.6 |
Created | Aug 25, 2023 |
---|---|
Updated | Oct 18, 2024 |