Changeset 3676 for trunk/tools


Ignore:
Timestamp:
Jun 8, 2000, 6:27:14 PM (25 years ago)
Author:
bird
Message:

Corrected bug in textbufferCreate. It failed creating buffers on empty files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/fastdep/fastdep.c

    r3556 r3676  
    1 /* $Id: fastdep.c,v 1.20 2000-05-18 21:28:40 bird Exp $
     1/* $Id: fastdep.c,v 1.21 2000-06-08 16:27:14 bird Exp $
    22 *
    33 * Fast dependents. (Fast = Quick and Dirty!)
     
    22492249    {
    22502250        signed long cbFile = fsize(phFile);
    2251         if (cbFile > 0)
     2251        if (cbFile >= 0)
    22522252        {
    22532253            pvFile = malloc(cbFile + 1);
     
    22552255            {
    22562256                memset(pvFile, 0, cbFile + 1);
    2257                 if (fread(pvFile, 1, cbFile, phFile) == 0)
     2257                if (cbFile > 0 && fread(pvFile, 1, cbFile, phFile) == 0)
    22582258                {   /* failed! */
    22592259                    free(pvFile);
Note: See TracChangeset for help on using the changeset viewer.