1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix crash when division by zero/modulo by zero happen on vectors

This commit is contained in:
Chaosus
2024-08-05 22:36:55 +03:00
parent 9e6098432a
commit 0524e29b5c
5 changed files with 37 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
func test():
var integer: int = 1
integer /= 0

View File

@@ -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 '/'.

View File

@@ -0,0 +1,3 @@
func test():
var integer: int = 1
integer %= 0

View File

@@ -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 '%'.