Changeset 2979


Ignore:
Timestamp:
Sep 6, 2007, 4:25:00 PM (15 years ago)
Author:
charles
Message:

fix a nasty size width truncation bug, reported by Eric in http://transmission.m0k.org/forum/viewtopic.php?t=2304&start=16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8x/libtransmission/inout.c

    r2961 r2979  
    124124    else if (fstat (fd, &sb) ) /* how big is the file? */
    125125        ret = tr_ioErrorFromErrno ();
    126     else if ((size_t)sb.st_size >= minSize) /* already big enough */
     126    else if (sb.st_size >= (off_t)minSize) /* already big enough */
    127127        ret = TR_OK;
    128128    else if (!ftruncate( fd, minSize )) /* grow it */
Note: See TracChangeset for help on using the changeset viewer.