Re: Text import & a bug



On Sat, Sep 27, 2003 at 12:37:12PM +0100, Nick Lamb wrote:
Switching on probing reveals a bug in code written a long time ago...

cvs server: Diffing .
Index: boot.c
===================================================================
RCS file: /cvs/gnome/gnumeric/plugins/excel/boot.c,v
retrieving revision 1.105
diff -u -r1.105 boot.c
--- boot.c      26 Sep 2003 04:21:54 -0000      1.105
+++ boot.c      27 Sep 2003 11:31:57 -0000
@@ -77,6 +77,7 @@
                return FALSE;
        ole = gsf_infile_msole_new (input, NULL);
        if (ole == NULL) {      /* Test for non-OLE BIFF file */
+               gsf_input_seek (input, 0, G_SEEK_SET);
                guint8 const *data = gsf_input_read (input, 2, NULL);
                return data && data[0] == 0x09 && (data[1] & 0xf1) == 0;
        }

Hmm, not pretty on several levels.

1) I'd consider it a libgsf bug, and will fix it there.  However, as
   this is a problem in the stable branch I can't really bump the
   version requirement.  So I'll fix it in both places for now.

2) Silly Mr. Lamb.  ANSI C doesn't like function calls _before_
   variable decls. (We screwed that up in 1.2.0 too)

Thanks



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]