mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
luau-compile: Fix usage of vector-ctor without vector-lib
When --vector-lib is not specified, CompileOptions::vectorLib was set to an empty string. This resulted in the builtin matching not working, since vectorLib must either be a null pointer or a pointer to a valid global identifier.
This commit is contained in:
parent
80928acb92
commit
233072f045
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ static Luau::CompileOptions copts()
|
|||
result.debugLevel = globalOptions.debugLevel;
|
||||
|
||||
// globalOptions outlive the CompileOptions, so it's safe to use string data pointers here
|
||||
result.vectorLib = globalOptions.vectorLib.c_str();
|
||||
result.vectorLib = globalOptions.vectorLib.empty() ? nullptr : globalOptions.vectorLib.c_str();
|
||||
result.vectorCtor = globalOptions.vectorCtor.c_str();
|
||||
result.vectorType = globalOptions.vectorType.c_str();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue