openclonk / openclonk

A free multiplayer action game where you control small and nimble humanoids
https://www.openclonk.org/
Other
322 stars 55 forks source link

Crash caused by C4Script #79

Closed bratkartoff closed 5 years ago

bratkartoff commented 5 years ago

The following code causes a crash on Openclonk 9.0 (Windows), Openclonk 8.1 Linux (and on Clonk Rage as well)

private func Initialize() { Test([[]]); }

private func Test(a) { if (GetType(a) == C4V_Int) return 0; SetLength(a, 1); Test(a[0]); return 0; }

Edit: Test map Crashtest.ocs.zip

isilkor commented 5 years ago

Testcase can be reduced to func f() { SetLength(nil, 0); }. SetLength always crashes when the first parameter is nil.

isilkor commented 5 years ago

Fixed in #80.