Skip to content

Commit 889619e

Browse files
Frederic Depuydtboppreh
Frederic Depuydt
authored andcommitted
Fixed Non-steam-games without Tags issue
1 parent 2bc7990 commit 889619e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

games.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ func addNonSteamGames(user User, games map[string]*Game) {
110110

111111
// The actual binary format is known, but using regexes is way easier than
112112
// parsing the entire file. If I run into any problems I'll replace this.
113-
gamePattern := regexp.MustCompile("(?i)\x00\x01appname\x00(.+?)\x00\x01exe\x00(.+?)\x00\x01.+?\x00tags\x00\x01(.*?)\x08\x08")
114-
tagsPattern := regexp.MustCompile("\\d\x00(.+?)\x00")
113+
gamePattern := regexp.MustCompile("(?i)\x00\x01appname\x00([^\x08]+?)\x00\x01exe\x00([^\x08]+?)\x00\x01[^\x08]+?\x00tags\x00(?:\x01([^\x08]+?)|)\x08\x08")
114+
tagsPattern := regexp.MustCompile("\\d\x00([^\x00\x01\x08]+?)\x00")
115115
for _, gameGroups := range gamePattern.FindAllSubmatch(shortcutBytes, -1) {
116116
gameName := gameGroups[1]
117117
target := gameGroups[2]

0 commit comments

Comments
 (0)