Skip to content

Commit bec511c

Browse files
committed
Fixed bug in pipeline setup
1 parent c792951 commit bec511c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/obfuscator/pipeline.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,16 @@ function Pipeline:new(settings)
8080
end
8181

8282
function Pipeline:fromConfig(config)
83+
config = config or {};
8384
local pipeline = Pipeline:new({
84-
LuaVersion = config.LuaVersion;
85-
PrettyPrint = config.PrettyPrint;
86-
VarNamePrefix = config.VarNamePrefix;
87-
Seed = config.Seed;
85+
LuaVersion = config.LuaVersion or LuaVersion.Lua51;
86+
PrettyPrint = config.PrettyPrint or false;
87+
VarNamePrefix = config.VarNamePrefix or "";
88+
Seed = config.Seed or 0;
8889
});
8990

91+
pipeline:setNameGenerator(config.NameGenerator or "MangledShuffled")
92+
9093
-- Add all Steps defined in Config
9194
local steps = config.Steps or {};
9295
for i, step in ipairs(steps) do

0 commit comments

Comments
 (0)