Skip to content

Commit

Permalink
Merge pull request #624 from mbbsemu/DosCalls
Browse files Browse the repository at this point in the history
Logging & Exception Fixes
  • Loading branch information
paladine authored Jun 11, 2024
2 parents 7f2d520 + a016d07 commit 71cf3e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions MBBSEmu/CPU/RegistersStructs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ public override string ToString()
output.Append($"BX={this.BX:X4} ");
output.Append($"CX={this.CX:X4} ");
output.Append($"DX={this.DX:X4} ");
output.Append($"CS={this.CS:X4} ");
output.Append($"DS={this.DS:X4} ");
output.AppendLine($"ES={this.ES:X4} ");
output.Append($"SI={this.SI:X4} ");
Expand Down
5 changes: 1 addition & 4 deletions MBBSEmu/HostProcess/ExportedModules/Majorbbs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4059,10 +4059,7 @@ private void catastro()

var formattedMessage = FormatPrintf(message, 2);

Console.ForegroundColor = ConsoleColor.Yellow;
Console.BackgroundColor = ConsoleColor.Red;
Console.WriteLine($"{Encoding.ASCII.GetString(formattedMessage)}");
Console.ResetColor();
_logger.Error($"({Module.ModuleIdentifier}) Catastro Failure: {Encoding.ASCII.GetString(formattedMessage)}");

Registers.Halt = true;
}
Expand Down
2 changes: 1 addition & 1 deletion MBBSEmu/HostProcess/MbbsHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ private void DisableModule(string moduleId, bool isCrashed = false)
}

//Notify Users and Exit Modules
foreach (var c in _channelDictionary.Values.Where(x => x.CurrentModule.ModuleIdentifier == moduleId))
foreach (var c in _channelDictionary.Values.Where(x => x.CurrentModule?.ModuleIdentifier == moduleId))
{
if (isCrashed)
{
Expand Down

0 comments on commit 71cf3e7

Please sign in to comment.