8000 tools/svg2tvgt: handle scientific notation in float · TinyVG/sdk@b8e82bc · GitHub
[go: up one dir, main page]

Skip to content

Commit b8e82bc

Browse files
vanclueverikskuh
authored andcommitted
tools/svg2tvgt: handle scientific notation in float
This updates the svg2tvgt to handle scientific notation in floating-point values, which can exist, apparently. ;)
1 parent 1b5f1f1 commit b8e82bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/svg2tvgt/svg2tvgt.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,20 +2192,20 @@ float ParseNumberGeneric(bool allow_sign)
21922192
{
21932193
while (true)
21942194
{
2195-
c = PeekAny("0123456789.");
2195+
c = PeekAny("0123456789.eE+-");
21962196
if (c == null)
21972197
return ParseFloat(begin.Slice());
2198-
AcceptChar("0123456789.");
2198+
AcceptChar("0123456789.eE+-");
21992199
if (c.Value == '.')
22002200
break;
22012201
}
22022202
}
22032203
while (true)
22042204
{
2205-
c = PeekAny("0123456789");
2205+
c = PeekAny("0123456789eE+-");
22062206
if (c == null)
22072207
return ParseFloat(begin.Slice());
2208-
AcceptChar("0123456789");
2208+
AcceptChar("0123456789eE+-");
22092209
}
22102210
}
22112211

0 commit comments

Comments
 (0)
0