X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fcatdoc.git;a=blobdiff_plain;f=src%2Fsubstmap.c;h=fcd8ead52e1e9f22a7e95b48272a33f8785a079b;hp=f29d62915c4f5bde1485031796fa7c5435823df4;hb=b7046520d2de550b7ac99599546fe0a5673470e6;hpb=51f0f8ed69b065cd2577a27c2a2911cdda243b99 diff --git a/src/substmap.c b/src/substmap.c index f29d629..fcd8ead 100644 --- a/src/substmap.c +++ b/src/substmap.c @@ -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 '"':