Skip to content

Commit

Permalink
fix: previous change of ordered map library caused an error to load s…
Browse files Browse the repository at this point in the history
…igned assets json
  • Loading branch information
luskaner committed Dec 19, 2024
1 parent 67fd0e5 commit f1f2a9a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server/internal/models/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ func (r *MainResources) initializeResponses(gameId string) {
continue
}
if r.keyedFilenames.ContainsOne(name) {
var result = orderedmap.NewOrderedMap[string, any]()
err = json.Unmarshal(data, result)
if err == nil {
rawSignature, _ := result.Get("dataSignature")
serverSignature := rawSignature.(string)
re := regexp.MustCompile(`"dataSignature"\s*:\s*"(.*?)"`)
matches := re.FindStringSubmatch(string(data))
if len(matches) == 1 {
serverSignature := matches[1]
r.KeyedFiles[name] = data
r.nameToSignature[name] = serverSignature
}
Expand Down

0 comments on commit f1f2a9a

Please sign in to comment.