]> www.wagner.pp.ru Git - oss/catdoc.git/blobdiff - src/writer.c
Fixed some warnings produced by GCC 4.9.2
[oss/catdoc.git] / src / writer.c
index 5f95ba2fdb3659f09ba1fe8c24e3a508bf89c423..c86b6fe84afb229f9b14cb0313cd7c2b47c8484c 100644 (file)
@@ -58,7 +58,8 @@ void out_char(const char *chunk) {
                if (p==outputbuffer) {
                        /*worst case - nowhere to wrap. Will use brute force */
                        int i = wrap_margin;
-                       if (from_unicode == to_utf8) {
+                       if (target_charset == NULL) {
+                               /* NULL target_charest means UTF-8 */
                                /* go back to start of nearest utf-8 character */
                                while(i>0 && (outputbuffer[i] & 0xC0) == 0x80) i--;
                        }