fix defect, add '\0' to output string
Merge pull request #45 from stevenyao/master

fix defect, add '\0' to output string