From 26c324c43c17ac4fd9647794f28d0894a3bea95c Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 10 Sep 2023 18:43:14 +0200 Subject: [PATCH] fix out of bounds miscomputation --- box.go | 8 ++++---- version.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/box.go b/box.go index 8223592..7bc3434 100644 --- a/box.go +++ b/box.go @@ -198,20 +198,20 @@ func TransferDirectZfs(from, to Addr) error { } - fromFromSnapshotId := len(fromSnapshots) + fromFromSnapshotId := len(fromSnapshots) - 1 fromToSnapshotId := -1 for fromFromSnapshotId >= 0 { - fromFromSnapshotId = fromFromSnapshotId - 1 - fromToSnapshotId = len(toSnapshots) + fromToSnapshotId = len(toSnapshots) - 1 for fromToSnapshotId >= 0 { - fromToSnapshotId = fromToSnapshotId - 1 if fromSnapshots[fromFromSnapshotId].name == toSnapshots[fromToSnapshotId].name { break } + fromToSnapshotId = fromToSnapshotId - 1 } if fromToSnapshotId >= 0 { break } + fromFromSnapshotId = fromFromSnapshotId - 1 } if fromFromSnapshotId == -1 { diff --git a/version.go b/version.go index 794dbfd..14f1a01 100644 --- a/version.go +++ b/version.go @@ -1,7 +1,7 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "3b1d0fc" +var githash = "2ca0695" var branch = "master" -var buildstamp = "2023-09-10_16:35:29" -var commits = "86" -var version = "3b1d0fc-b86 - 2023-09-10_16:35:29" +var buildstamp = "2023-09-10_16:42:46" +var commits = "87" +var version = "2ca0695-b87 - 2023-09-10_16:42:46"