From b4bb6c4915c23aa47e29e053bc698e2482b3016a Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Tue, 4 Mar 2025 23:48:14 -0800 Subject: [PATCH 1/2] Off-by-one in the error message for a VCR key mismatch. --- .../src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt b/jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt index a254a57d..c3783131 100644 --- a/jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt +++ b/jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt @@ -111,7 +111,7 @@ internal constructor( val expected = state.frames[currentFrame] if (expected.first != key) { throw fs.assertFailed( - mode.msgVcrMismatch("$sub[$OPEN${currentFrame}$CLOSE]", expected.first, key, call), + mode.msgVcrMismatch("$sub[$OPEN${currentFrame+1}$CLOSE]", expected.first, key, call), expected.first, key) } From b4f0da1581a531db6f3fefc1b8bb74f11ee05034 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Tue, 4 Mar 2025 23:49:06 -0800 Subject: [PATCH 2/2] Update changelog. --- jvm/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jvm/CHANGELOG.md b/jvm/CHANGELOG.md index 02d04293..3fe27bdd 100644 --- a/jvm/CHANGELOG.md +++ b/jvm/CHANGELOG.md @@ -11,6 +11,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Off-by-one in the error message for a VCR key mismatch. ([#526](https://github.com/diffplug/selfie/pull/526)) ## [2.5.1] - 2025-03-04 ### Fixed