Opened 4 years ago

Closed 3 years ago

#7139 closed defect (fixed)

BBVS: Undefined behavior - shift of a negative value

Reported by: salty-horse Owned by: csnover
Priority: normal Component: Engine: BBVS
Keywords: Cc:
Game: Beavis & Butthead Virtual Stupidity

Description

In the Bug Justice minigame code, clang warns of bitwise shifts of a negative value, which are undefined behavior in C++:

~~~text engines/bbvs/minigames/bbant.cpp 591: obj->yIncr = (-1 x x > (330 y y > (250 yIncr = (-4 << 16); ~~~

Ticket imported from: bugs/7139.

Change History (1)

comment:1 by csnover, 3 years ago

Owner: set to csnover
Resolution: fixed
Status: newclosed

Oops, I fixed these in cc12c878b7faba373ac23aecf798f979122e5bd8 and didn’t even realise there was a ticket open for it.

Note: See TracTickets for help on using tickets.