Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: jvyden <[email protected]>
Signed-off-by: Beyley Thomas <[email protected]>
  • Loading branch information
Beyley and jvyden authored Aug 25, 2024
1 parent f261277 commit 6cc711a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Refresh.Common/Helpers/HexHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static string BytesToHexString(ReadOnlySpan<byte> data)
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
public static byte[] HexStringToBytes(string hex) {
if (hex.Length % 2 != 0)
throw new Exception("The hex string must have an even number of bytes");
throw new FormatException("The hex string is invalid as it contains an odd number of bytes.");

// Two hex digits per byte
byte[] arr = new byte[hex.Length / 2];
Expand Down
4 changes: 2 additions & 2 deletions Refresh.GameServer/Services/CommandService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ public void HandleCommand(CommandInvocation command, GameDatabaseContext databas
database.SetUnescapeXmlSequences(user, false);
break;
}
case "showmoddedcontent":
case "showmods":
{
database.SetShowModdedContent(user, true);
break;
}
case "hidemoddedcontent":
case "hidemods":
{
database.SetShowModdedContent(user, false);
break;
Expand Down

0 comments on commit 6cc711a

Please sign in to comment.