X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fcatdoc.git;a=blobdiff_plain;f=src%2Fole.c;fp=src%2Fole.c;h=9931b579cea2fc7a48cc4e536c316d519347f80a;hp=ff21a30e587c4d5f735fec4ba548b07ced0c1d46;hb=556e2a24c66cb05296297c7937b3590b228cccf4;hpb=51f0f8ed69b065cd2577a27c2a2911cdda243b99 diff --git a/src/ole.c b/src/ole.c index ff21a30..9931b57 100644 --- a/src/ole.c +++ b/src/ole.c @@ -2,7 +2,7 @@ * @file ole.c * @author Alex Ott, Victor B Wagner * @date Wed Jun 11 12:33:01 2003 - * Version: $Id: ole.c,v 1.1 2006-02-24 17:44:06 vitus Exp $ + * Version: $Id: ole.c,v 1.2 2006-02-25 15:28:14 vitus Exp $ * Copyright: Victor B Wagner, 1996-2003 Alex Ott, 2003 * * @brief Parsing structure of MS Office compound document @@ -243,7 +243,7 @@ FILE* ole_init(FILE *f, void *buffer, size_t bufSize) { /* Find Root Entry */ while((tEntry=(oleEntry*)ole_readdir(newfile)) != NULL) { - if (!tEntry->name[0]||strcmp(tEntry->name,"Root Entry") == 0) { + if (tEntry->type == oleRootDir ) { rootEntry=tEntry; break; } @@ -252,8 +252,7 @@ FILE* ole_init(FILE *f, void *buffer, size_t bufSize) { propCurNumber = 0; fseek(newfile, 0, SEEK_SET); if (!rootEntry) { - fprintf(stderr,"Cannot find root entry in this file!\n"); - ole_finish(); + fprintf(stderr,"Broken OLE structure. Cannot find root entry in this file!\n"); ole_finish(); return NULL; } return newfile;