]> www.wagner.pp.ru Git - oss/catdoc.git/blobdiff - src/substmap.c
Merge branch 'master' of http://wagner.pp.ru/git/oss/catdoc
[oss/catdoc.git] / src / substmap.c
index f29d62915c4f5bde1485031796fa7c5435823df4..fcd8ead52e1e9f22a7e95b48272a33f8785a079b 100644 (file)
@@ -39,7 +39,7 @@ SUBSTMAP read_substmap(char* filename) {
        char s[256];
        char stopchar;
        int escaped, lineno=0, i;
-       unsigned int uc;
+    int32_t uc;
        path=find_file(filename,add_exe_path(map_path));
        if (!path) {
                free(map);
@@ -51,7 +51,8 @@ SUBSTMAP read_substmap(char* filename) {
        }
        f=fopen(path,"rb");
        if (!f) {
-               perror("catdoc");
+               perror(path);
+               free(map);
                return NULL;
        }
        if (input_buffer)
@@ -78,7 +79,7 @@ SUBSTMAP read_substmap(char* filename) {
                }
                /* skip space between  code and sequence */
                for(;*p && isspace(*p);p++);
-               if (!p) continue;
+               if (!*p) continue;
                switch (*p) {
                        case '\'':
                        case '"':