aboutsummaryrefslogtreecommitdiffstats
path: root/tap-comparestat.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-03-07 21:58:30 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-03-07 21:58:30 +0000
commit4f8edc81e68e349f821790920bc7cee59d084c13 (patch)
tree9b4b6b9eefca612f22aa9f4b6761197cd5587a82 /tap-comparestat.c
parente6ce1793e2fe3cd0a04b6aba482d6c34ddf8b8ff (diff)
Allow <interval> to be successfully sscanf'd no matter the locale for the
decimal symbol. Similar to the fix made to tap-iostat.c to resolve bug 2880. Motivated by the discussion started from this thread on the user list: http://www.wireshark.org/lists/wireshark-users/201103/msg00018.html svn path=/trunk/; revision=36160
Diffstat (limited to 'tap-comparestat.c')
-rw-r--r--tap-comparestat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tap-comparestat.c b/tap-comparestat.c
index 7e123a326f..2215355ccd 100644
--- a/tap-comparestat.c
+++ b/tap-comparestat.c
@@ -515,9 +515,12 @@ comparestat_init(const char *optarg, void* userdata _U_)
gint start, stop,ttl, order, pos=0;
gdouble variance;
- 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;
}