fix sendPrompt()

a extra '\0' will be sent when sizeof() is used
Merge pull request #7816 from xiangxw/fix_sendPrompt

fix sendPrompt()