=== modified file 'termkey.c' --- termkey.c 2009-11-23 23:59:46 +0000 +++ termkey.c 2009-07-15 19:40:44 +0000 @@ -871,14 +871,14 @@ if(codepoint >= 'a' && codepoint <= 'z') { l = snprintf(buffer + pos, len - pos, wrapbracket ? "<^%c>" : "^%c", (char)codepoint - 0x20); if(l <= 0) return pos; - pos += l; + pos += len; return pos; } else if((codepoint >= '@' && codepoint < 'A') || (codepoint > 'Z' && codepoint <= '_')) { l = snprintf(buffer + pos, len - pos, wrapbracket ? "<^%c>" : "^%c", (char)codepoint); if(l <= 0) return pos; - pos += l; + pos += len; return pos; } }