--- src/dtoa.c
+++ src/dtoa.c
@@ -3618,7 +3618,7 @@
 			while(c == '0')
 				c = *++s;
 			if (c > '0' && c <= '9') {
-				L = c - '0';
+				ULong L = c - '0';
 				s1 = s;
 				while((c = *++s) >= '0' && c <= '9')
 					L = 10*L + c - '0';