Re:Doom crash after 2.5 years of real-world runtime confirme...
by tekne on Wednesday September 17, 2025 @05:25PM
(#45281571)
Umm, signed integers are UB on overflow; unsigned is always fine.
[ Parent
| on HN ]
Re:Doom crash after 2.5 years of real-world runtime confirme...
by jbreckmckye on Thursday September 18, 2025 @08:43AM
(#45288937)
Sorry, you are correct. I don't think unsigned overflow behaviour was defined until C99 though.
Anyway, in answer to the question, I would guess the reason was because of signed / unsigned type promotion.