mirror of https://github.com/mono/CppSharp.git
Browse Source
There are multiple places in the parser which do something similar to this: Foo *ptr = 0; if (...) { Foo val = ...; ptr = &val; } func(ptr); In other words, the code takes a pointer to a local variable, and the pointer is used even after the local variable's scope has ended. This causes a crash on Linux. For some reason this works fine on Windows + Visual studio. This patchs moves the variable ("val" in the above example) to outer scopes, so that its life time is extended to cover the use. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>pull/261/head
1 changed files with 19 additions and 11 deletions
Loading…
Reference in new issue