diff --git a/data/manifest.yaml b/data/manifest.yaml index f25804a9..57f55ada 100644 --- a/data/manifest.yaml +++ b/data/manifest.yaml @@ -85065,7 +85065,6 @@ CarX Drift Racing Online: - 1178950 - 1159010 - 1112470 - - 11124601112420 - 998560 - 967320 - 965040 diff --git a/src/manifest.ts b/src/manifest.ts index 59d63cf3..414c03f8 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -2,6 +2,9 @@ import { REPO, YamlFile } from "."; import { SteamGameCache, SteamGameCacheFile } from "./steam"; import { WikiGameCache, parseTemplates } from "./wiki"; +const U32_MAX = 4_294_967_295; +const U64_MAX = 18_446_744_073_709_551_615; + export type Os = "dos" | "linux" | "mac" | "windows"; export type Bit = 32 | 64; @@ -85,17 +88,17 @@ function doLaunchPathsMatch(fromSteam: string | undefined, fromManifest: string function integrateWikiData(game: Game, cache: WikiGameCache[""]): void { game.id = {}; - if (cache.steam !== undefined) { + if (cache.steam !== undefined && cache.steam <= U32_MAX) { game.steam = { id: cache.steam }; } if (cache.steamSide !== undefined) { - game.id.steamExtra = cache.steamSide; + game.id.steamExtra = cache.steamSide.filter(x => x <= U32_MAX); } - if (cache.gog !== undefined) { + if (cache.gog !== undefined && cache.gog <= U64_MAX) { game.gog = { id: cache.gog }; } if (cache.gogSide !== undefined) { - game.id.gogExtra = cache.gogSide; + game.id.gogExtra = cache.gogSide.filter(x => x <= U64_MAX); } const info = parseTemplates(cache.templates ?? []); game.files = info.files;