From 3f5d183a44cada18eea7969fd8cc60f8e8781b26 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 25 Jun 2015 02:05:30 +0200 Subject: 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 Petri-Dish: Alexis La Goutte Petri-Dish: Gerald Combs Reviewed-by: Anders Broman --- epan/dissectors/packet-catapult-dct2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/dissectors/packet-catapult-dct2000.c') diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index f1fa6f58f5..df8a461b2e 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -2139,7 +2139,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) displayed as a custom column... */ proto_tree_add_double(dct2000_tree, hf_catapult_dct2000_timestamp, tvb, offset, timestamp_length, - atof(timestamp_string)); + g_ascii_strtod(timestamp_string, NULL)); } offset += timestamp_length; -- cgit v1.2.3