Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

signed integer overflow in Q_rand()

Open ghost opened this issue 5 years ago • 0 comments

From UBsan:

Unvanquished/daemon/src/engine/qcommon/q_math.cpp:141:18: runtime error: signed integer overflow: 69069 * 69070 cannot be represented in type 'int'

I don't really think this is important tbh, but filing the bug to not forget it, since I think it would still be better to have a correct rand implementation. Well, it would probably be better to just use C++11's rand API instead...

ghost avatar Oct 30 '21 15:10 ghost