VBA-tools / VBA-Web

VBA-Web: Connect VBA, Excel, Access, and Office for Windows and Mac to web services and the web
http://vba-tools.github.io/VBA-Web/
MIT License
2.01k stars 494 forks source link

A small bug concerning decimal numbers in different locales #96

Closed erikb999 closed 9 years ago

erikb999 commented 9 years ago

Hi, thanks for excellent software! It has made it possible to create a json-integration to a cloud solution in just a couple of days for a developer that has used VBA very little over the years.

Found a small bug:

In WebHelpers function json_ParseNumber the handling of "." and "," is faulty, which showed up when parsing json numbers in a "," locale (Sweden). The problem is that Val is not locale-aware, it always uses "." which is the decimal point specified in json. So the locale-aware change from "." to "," is not needed and in fact faulty - and should be removed!

Thanks /Erik

timhall commented 9 years ago

Ah, you're right, that was a carryover from when CDbl / CInt were used. Thanks for raising this issue, I'll get if fixed today.