Skip to content

Commit

Permalink
Merge pull request #363 from tanakanira0118/fix/read-game-code
Browse files Browse the repository at this point in the history
Fixed a problem where display the room code was "??????"
  • Loading branch information
kurokobo authored Jun 28, 2023
2 parents 1cd4b71 + 91b2821 commit 08bbc1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AmongUsCapture/Memory/GameMemReader.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using AmongUsCapture.Memory.Structs;
using AUOffsetManager;
Expand Down Expand Up @@ -350,7 +351,7 @@ public void RunLoop() {

if (state != oldState && state == GameState.LOBBY || shouldReadLobby) {
var gameCode = GetGameCode(ProcessMemory.getInstance());
if (!string.IsNullOrEmpty(gameCode)) {
if (!string.IsNullOrEmpty(gameCode) && Regex.IsMatch(gameCode, "^[A-Z]{4}$|^[A-Z]{6}$|^\\*{6}$")) {
latestLobbyEventArgs = new LobbyEventArgs {
LobbyCode = gameCode,
Region = GetPlayRegion(ProcessMemory.getInstance()),
Expand Down

0 comments on commit 08bbc1b

Please sign in to comment.