From 1b8f28cf3517881b60bd8f562c4fdf3f174f8f11 Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Sun, 24 Jan 2021 23:51:52 -0800 Subject: [PATCH] Fix warnings for null range in idx() --- arrays.scad | 2 +- version.scad | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arrays.scad b/arrays.scad index f6a85fe..7619648 100644 --- a/arrays.scad +++ b/arrays.scad @@ -986,7 +986,7 @@ function unique_count(list) = function idx(list, s=0, e=-1, step=1) = assert(is_list(list)||is_string(list), "Invalid input." ) let( ll = len(list) ) - ll == 0 ? [0:1:-1] : + ll == 0 ? [0:1:ll-1] : let( _s = posmod(s,ll), _e = posmod(e,ll) diff --git a/version.scad b/version.scad index 649c0ce..a0652e5 100644 --- a/version.scad +++ b/version.scad @@ -6,7 +6,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,541]; +BOSL_VERSION = [2,0,542]; // Section: BOSL Library Version Functions