Decode: Fix strdup warning on MSVC
Decode: Fix unsigned/signed mismatch comparisons