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

decimal symbol.  Fixes bug 2880.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34926 f5534014-38df-0310-8fa8-9805f1628bb7
This commit is contained in:
cmaynard 2010-11-17 14:26:38 +00:00
parent 477d5ae245
commit 4f13f535cb
1 changed files with 5 additions and 2 deletions

View File

@ -655,9 +655,12 @@ iostat_init(const char *optarg, void* userdata _U_)
io_stat_t *io;
const char *filter=NULL;
if(sscanf(optarg,"io,stat,%f,%n",&interval_float,&idx)==1){
if(sscanf(optarg,"io,stat,%f%n",&interval_float,&idx)==1){
if(idx){
filter=optarg+idx;
if(*(optarg+idx)==',')
filter=optarg+idx+1;
else
filter=optarg+idx;
} else {
filter=NULL;
}