Skip to content

Commit e390082

Browse files
committed
[共通] fix #1226
1 parent db4b25a commit e390082

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Siv3D/src/Siv3D/ParseFloat/SivParseFloat.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace s3d
2727

2828
static double ParseDouble(StringView s)
2929
{
30-
while (IsSpace(s.front()))
30+
while ((not s.isEmpty()) && IsSpace(s.front()))
3131
{
3232
s.remove_prefix(1);
3333
}
@@ -46,7 +46,7 @@ namespace s3d
4646
template <class FloatType>
4747
static Optional<FloatType> ParseFloatingPointOpt(StringView s) noexcept
4848
{
49-
while (IsSpace(s.front()))
49+
while ((not s.isEmpty()) && IsSpace(s.front()))
5050
{
5151
s.remove_prefix(1);
5252
}

0 commit comments

Comments
 (0)