Allow <variance> to be successfully sscanf'd no matter the locale for the

decimal symbol.  Same change and reason as for revision 36160.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36166 f5534014-38df-0310-8fa8-9805f1628bb7
This commit is contained in:
cmaynard 2011-03-08 14:57:38 +00:00
parent 161c490d9c
commit cc99e4f389
1 changed files with 5 additions and 2 deletions

View File

@ -711,9 +711,12 @@ gtk_comparestat_init(const char *optarg, void* userdata _U_)
const char *filter=NULL;
GString *error_string;
if(sscanf(optarg,"compare,%d,%d,%d,%d,%lf,%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
if(sscanf(optarg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
if(pos){
filter=optarg+pos;
if(*(optarg+pos)==',')
filter=optarg+pos+1;
else
filter=optarg+pos;
} else {
filter=NULL;
}