Corrected erroneous sprintf() (closes #3296)
Merge pull request #583 from eguaj/3.1-A3296

Corrected erroneous sprintf() (closes #3296)