Arm1stice/base62

"10" and "Z" are the same number

Closed this issue · 1 comments

Looks like the base62 conversion isn't working properly

We were using log of 61 and power of 61 instead of 62, meaning that "10" == "Z", which was wrong. This fixes that error. Additionally, there was a bug in FromB62 that calculated the value of the character incorrectly, as it treated the first character as the least valuable, rather than the most valuable. Instead of using more CPU cycles to reverse the string first, I decided to simply base the value off of length-index-1.