Fix credential decode index out of range
Merge pull request #3 from blang/fix_credentialdecode

Fix credential decode index out of range