Skip to content

Prevent casting negative charge to unsigned int

Simon Spannagel requested to merge fix_signed_cast into master

Fixes issue found and reported by @tbisanz.

Lesson learned: think instead of blindly casting doubles that could well be negative to unsigned int.

Unfortunately this makes the nice 2^32-1 charge depositions go away... 😿 If this was real-world, we would have had a perpetuum mobile. 🤷

Merge request reports