You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sqids
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -641,7 +641,7 @@ to_id() {
641
641
local id_chars=()
642
642
643
643
whiletrue;do
644
-
id_chars=("${alphabet:$((num %${#alphabet})):1}""${id_chars[@]+"${id_chars[@]}"}") # it can be "${id_chars[@]}" without `set -u`, workaround for bash 4.0.0
644
+
id_chars=("${alphabet:$((num %${#alphabet})):1}""${id_chars[@]+"${id_chars[@]}"}") # it can be "${id_chars[@]}" without `set -u`, workaround for bash 4.0
645
645
num=$((num /${#alphabet}))
646
646
if [[ $num-eq 0 ]];then
647
647
break
@@ -1096,7 +1096,7 @@ main() {
1096
1096
case"$mode"in
1097
1097
"encode")
1098
1098
if$flag_a||$flag_b;then
1099
-
encode -a "$alphabet" -b "${filtered_blocklist[*]+"${filtered_blocklist[*]}"}" -l "$min_length""$@"# it can be "${filtered_blocklist[*]}" without `set -u`, workaround for bash 4.0.0
1099
+
encode -a "$alphabet" -b "${filtered_blocklist[*]+"${filtered_blocklist[*]}"}" -l "$min_length""$@"# it can be "${filtered_blocklist[*]}" without `set -u`, workaround for bash 4.0
1100
1100
else
1101
1101
encode -a "$alphabet" -b "${block_list[*]}" -l "$min_length""$@"
0 commit comments