]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
OP_DIV_*: add division by zero checks. divVerent/div_u
authorRudolf Polzer <divVerent@gmail.com>
Fri, 3 Jan 2025 23:28:23 +0000 (18:28 -0500)
committerRudolf Polzer <divVerent@gmail.com>
Fri, 3 Jan 2025 23:40:44 +0000 (18:40 -0500)
commit10c4c04d8d161b69efbb94e4bdeab7e7c18e1773
treeea6171f5484ea9ee5b16cd3bbf1abe13cabac04f
parent95f366ee21e47e13d44b534db51af11536acda35
OP_DIV_*: add division by zero checks.

Now all the OP_DIV operations emit a warning and proceed on division by
zero, instead of potentially crashing the program.

This also handles the special case of -2147483648 / -1, which also traps on
x86 and thus must be handled.
prvm_execprogram.h
qtypes.h