Fixed wrong variable type for sprintf error message.
Made test pass with corrected error message.