setTerrainPoint causes a crash if you give it an object handle
-
I found this bug by trying to update the terrain object instead of the terrain itself. This bug is quite easy to reproduce.
Create a terrain and store the handle in a variable. Now use placeObject to place the terrain and store the object handle in a variable.
Now use setTerrainPoint, but don't provide the terrain handle, but give the handle you got from placeObject. Now run. Crash.
If you provide an arbitrary number or string then FUZE correctly stops the program and shows a helpful error.
Example:
ter = createTerrain(64,1) obj = placeObject(ter, {0,0,0},{1,1,1}) // This works: setTerrainPoint(ter, 32,32,10,green) // This causes FUZE to crash: setTerrainPoint(obj, 32,32,10,green) // This correctly tells you int is invalid: setTerrainPoint(2, 32,32,10,green)