diff options
author | Nick White <git@njw.name> | 2021-02-08 14:59:10 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-02-08 14:59:10 +0000 |
commit | de17e27799e372b5056814550c344f6a62353128 (patch) | |
tree | 1e3e003192d3e90c7921022fa706ce640d9849d7 /wipesides.go | |
parent | 34dda838f09cd3c9d95d435e8fa8ac446401843f (diff) | |
parent | b992e8482c6302af8e804c1b065ba8b8016561bb (diff) |
Merge branch 'master' of https://git.rescribe.xyz/preproc
Diffstat (limited to 'wipesides.go')
-rw-r--r-- | wipesides.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wipesides.go b/wipesides.go index 9183479..b9f5e5c 100644 --- a/wipesides.go +++ b/wipesides.go @@ -55,6 +55,9 @@ func findbestedge(img SummableImage, x int, w int) int { bestxs = append(bestxs, x) } } + if len(bestxs) == 0 { + return 0 + } middlex := bestxs[len(bestxs)/2] return middlex |