From 4f13f535cb40ad7b27fef8102fea8fe70df126f9 Mon Sep 17 00:00:00 2001 From: cmaynard Date: Wed, 17 Nov 2010 14:26:38 +0000 Subject: [PATCH] Allow 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 --- tap-iostat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tap-iostat.c b/tap-iostat.c index c6838a4e57..e5b354d5b1 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -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; }