aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate/mate_grammar.lemon
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-25 02:05:30 +0200
committerAnders Broman <a.broman58@gmail.com>2015-06-25 15:38:45 +0000
commit3f5d183a44cada18eea7969fd8cc60f8e8781b26 (patch)
tree962bb8a20973711a825153734cf20d069b5a5ef4 /plugins/mate/mate_grammar.lemon
parentfe6ece9689d54e64e9f1fdc74170da343db16aff (diff)
Stop using atof/strtod (fixes column sorting of float types)
atof is locale-dependent. In locales such as Swedish, German and Dutch, the dot is a thousand separator, resulting in wrong conversions for floats. While at it, make the mate dissector also be independent of locale. Blacklist atof in checkAPIs. Lemon is still using strtod, but that is not our problem for now. Bug: 11297 Bug: 8964 Change-Id: I6fe3e45eb1d6d95d41aa4f3af1f81a6204a60c63 Reviewed-on: https://code.wireshark.org/review/9116 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/mate/mate_grammar.lemon')
-rw-r--r--plugins/mate/mate_grammar.lemon4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mate/mate_grammar.lemon b/plugins/mate/mate_grammar.lemon
index eea18aa2ae..83e280edbc 100644
--- a/plugins/mate/mate_grammar.lemon
+++ b/plugins/mate/mate_grammar.lemon
@@ -602,11 +602,11 @@ pdu_name(A) ::= NAME(B). {
time_value(A) ::= FLOATING(B). {
- A = (float) strtod(B,NULL);
+ A = (float) g_ascii_strtod(B,NULL);
}
time_value(A) ::= INTEGER(B). {
- A = (float) strtod(B,NULL);
+ A = (float) g_ascii_strtod(B,NULL);
}
/************* GOG