Fix crash when division by zero/modulo by zero happen on vectors
This commit is contained in:
parent
9e6098432a
commit
0524e29b5c
5 changed files with 37 additions and 2 deletions
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var integer: int = 1
|
||||
integer /= 0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
GDTEST_RUNTIME_ERROR
|
||||
>> SCRIPT ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/division_by_zero.gd
|
||||
>> 3
|
||||
>> Division by zero error in operator '/'.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var integer: int = 1
|
||||
integer %= 0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
GDTEST_RUNTIME_ERROR
|
||||
>> SCRIPT ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/modulo_by_zero.gd
|
||||
>> 3
|
||||
>> Modulo by zero error in operator '%'.
|
||||
Loading…
Add table
Add a link
Reference in a new issue