Changeset 8556


Ignore:
Timestamp:
May 28, 2009, 3:22:41 PM (12 years ago)
Author:
charles
Message:

(1.5x libT) #2122: fix json error when jumping back and forth between 1.5x and 1.6x.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/libtransmission/json.c

    r7963 r8556  
    9595        {
    9696            char buf[128];
    97             tr_snprintf( buf, sizeof( buf ), "%f",
    98                          (double)value->vu.float_value );
     97            char locale[128];
     98
     99            tr_strlcpy( locale, setlocale( LC_NUMERIC, NULL ), sizeof( locale ) );
     100            setlocale( LC_NUMERIC, "POSIX" );
     101            tr_snprintf( buf, sizeof( buf ), "%f", (double)value->vu.float_value );
     102            setlocale( LC_NUMERIC, locale );
     103
    99104            tr_bencInitStr( getNode( data ), buf, -1 );
    100105            data->hasContent = TRUE;
Note: See TracChangeset for help on using the changeset viewer.