Changeset 11079


Ignore:
Timestamp:
Jul 31, 2010, 2:45:07 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #3462 "minor json formatting optimization: omit unnecessary floating-point precision" -- done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r10912 r11079  
    13501350    char locale[128];
    13511351
    1352     if( fabs( val->val.d ) < 0.00001 )
    1353         evbuffer_add( data->out, "0", 1 );
     1352    if( fabs( val->val.d - (int)val->val.d ) < 0.00001 )
     1353        evbuffer_add_printf( data->out, "%d", (int)val->val.d );
    13541354    else {
    13551355        /* json requires a '.' decimal point regardless of locale */
Note: See TracChangeset for help on using the changeset viewer.