Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickfix of a bug introduced in #2157 #2162

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DMCompiler/DMCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
ForcedWarning("Unimplemented proc & var warnings are currently suppressed");
}

DMPreprocessor preprocessor = Preprocess(this, settings.Files, settings.MacroDefines);

Check warning on line 69 in DMCompiler/DMCompiler.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference argument for parameter 'files' in 'DMPreprocessor? DMCompiler.Preprocess(DMCompiler compiler, List<string> files, Dictionary<string, string>? macroDefines)'.
bool successfulCompile = preprocessor is not null && Compile(preprocessor);

if (successfulCompile) {
Expand Down Expand Up @@ -129,7 +129,8 @@
}

// Adds the root of the DM project to FILE_DIR
compiler.AddResourceDirectory(Path.GetDirectoryName(files[0]) ?? "/");
var dirName = Path.GetDirectoryName(files[0]);
compiler.AddResourceDirectory(string.IsNullOrEmpty(dirName) ? "/" : dirName);

string compilerDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
string dmStandardDirectory = Path.Join(compilerDirectory, "DMStandard");
Expand Down
Loading