ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.23k stars 397 forks source link

correctly render cardcast codes with leading zeros #118

Closed drbild closed 10 years ago

drbild commented 10 years ago

The /listcardcast output drops leading zeros from the deck codes, due to the string -> number -> string conversion process.

This commit fixes the displayed output by zero-padding the code to ensure it has the full five digits.

I don't know if this same issue manifests elsewhere.