git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38855 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -11,6 +11,7 @@
* \author Original author CERL
*/
+#include <string.h>
#include <grass/gis.h>
/*!
@@ -24,6 +25,10 @@ void G_trim_decimal(char *buf)
{
char *mark;
+ /* don't trim e+20 into e+2 */
+ if( strchr(buf, 'e') || strchr(buf, 'E') )
+ return 0;
+
/* find the . */
while (*buf != '.')
if (*buf++ == 0)