From 4943e80b75c32794c92b650b253265641f142341 Mon Sep 17 00:00:00 2001 From: Jenan Wise Date: Fri, 30 Jul 2021 13:41:30 -0700 Subject: [PATCH] Fix read of patch version when serializing. Previously we were loading the minor version number into the patch version value. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 3ec2051..a62262f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -154,7 +154,7 @@ function serializeDeck(deck: Card[]): string { export function serializeOathGame(game: OathGame): string { const oathMajor = parseInt(game.version.major, 10); const oathMinor = parseInt(game.version.minor, 10); - const oathPatch = parseInt(game.version.minor, 10); + const oathPatch = parseInt(game.version.patch, 10); if (oathMajor < 3 || (oathMajor === 3 && oathMinor < 1)) { throw new Error('Oath savefile version 3.1.0 is the minimum required.');