Swift: Fix Debian Array index out of range