diff --git a/golded3/gectrl.cpp b/golded3/gectrl.cpp index e7e5a67..29314db 100644 --- a/golded3/gectrl.cpp +++ b/golded3/gectrl.cpp @@ -163,10 +163,10 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) { lp = s + strlen(s); - while((lp>s) and in_range((char)(*lp-1), (char)' ', (char)'\x7F')) + while((lp>s) and in_range(lp[-1], ' ', '\x7F')) lp--; - for(const char* ptr = s; *ptr and (ptr<=lp); ptr++) { + for(const char* ptr = s; *ptr and (ptrcharset) {