fix out of bounds miscomputation
This commit is contained in:
parent
2ca0695a1f
commit
26c324c43c
8
box.go
8
box.go
@ -198,20 +198,20 @@ func TransferDirectZfs(from, to Addr) error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fromFromSnapshotId := len(fromSnapshots)
|
fromFromSnapshotId := len(fromSnapshots) - 1
|
||||||
fromToSnapshotId := -1
|
fromToSnapshotId := -1
|
||||||
for fromFromSnapshotId >= 0 {
|
for fromFromSnapshotId >= 0 {
|
||||||
fromFromSnapshotId = fromFromSnapshotId - 1
|
fromToSnapshotId = len(toSnapshots) - 1
|
||||||
fromToSnapshotId = len(toSnapshots)
|
|
||||||
for fromToSnapshotId >= 0 {
|
for fromToSnapshotId >= 0 {
|
||||||
fromToSnapshotId = fromToSnapshotId - 1
|
|
||||||
if fromSnapshots[fromFromSnapshotId].name == toSnapshots[fromToSnapshotId].name {
|
if fromSnapshots[fromFromSnapshotId].name == toSnapshots[fromToSnapshotId].name {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
fromToSnapshotId = fromToSnapshotId - 1
|
||||||
}
|
}
|
||||||
if fromToSnapshotId >= 0 {
|
if fromToSnapshotId >= 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
fromFromSnapshotId = fromFromSnapshotId - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if fromFromSnapshotId == -1 {
|
if fromFromSnapshotId == -1 {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by version.sh (@generated) DO NOT EDIT.
|
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||||
package main
|
package main
|
||||||
var githash = "3b1d0fc"
|
var githash = "2ca0695"
|
||||||
var branch = "master"
|
var branch = "master"
|
||||||
var buildstamp = "2023-09-10_16:35:29"
|
var buildstamp = "2023-09-10_16:42:46"
|
||||||
var commits = "86"
|
var commits = "87"
|
||||||
var version = "3b1d0fc-b86 - 2023-09-10_16:35:29"
|
var version = "2ca0695-b87 - 2023-09-10_16:42:46"
|
||||||
|
Loading…
Reference in New Issue
Block a user