jaroslawhartman / TimeZones-Alfred

Alfred Workflow
https://jhartman.pl/tag/time-zones/
Apache License 2.0
496 stars 20 forks source link

Error when more than 7 zones on the list #28

Closed jaroslawhartman closed 5 years ago

jaroslawhartman commented 5 years ago

Reported in the forum

Bash interprets numbers with leading zeroes as being in octal, so it throws an error if you have more than 7 timezones and resets the sort count to zero.

That line should be sortkey=$(printf "%03d" $(( 10#$sortkey + 1 )))

The 10# tells bash to interpret the numbers in base 10.

jaroslawhartman commented 5 years ago

Thanks to deanishe for the fix.

jaroslawhartman commented 5 years ago

Fixed in v2.13 and c1eb11d9bb3dcd7a8560c59cbe4f42cf099a3754