enigma-dev/enigma-dev — pull request #613 by sorlok (2014-01-14 04:54:56+00:00)
Title: toString() cleanup.

This pull request comprises two fixes:

1) The first fixes a potential buffer overflow (which could occur by calling toString() with a "long" on a 64-bit system). Rather than cutting it close, a shared buffer of size 128 is used.

2) The second dispatches toString(var) to either toString(string), toString(double), or toString(long) depending on the type. Previously, all integral types were treated as doubles, but this is unrealistic, since it meant that large longs would be truncated via scientific notation (like large doubles) simply because of how variant stores them.