fix bug: codepad output missing last char