summaryrefslogtreecommitdiff
path: root/source/fud_format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fud_format.cpp')
-rw-r--r--source/fud_format.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/fud_format.cpp b/source/fud_format.cpp
index 04e611e..6bd5aae 100644
--- a/source/fud_format.cpp
+++ b/source/fud_format.cpp
@@ -23,12 +23,9 @@ FudStatus getFormatSign(StringView& formatView, FormatSpec& spec);
} // namespace impl
-Result<FormatSpec, FudStatus> FormatSpec::make(StringView formatView, size_t& specLength)
+Result<FormatSpec, FudStatus> FormatSpec::parse(StringView formatView, size_t& specLength)
{
- static_cast<void>(formatView);
- static_cast<void>(specLength);
-
- if (formatView[0] != FormatSpec::openBracket) {
+ if (formatView.length() < 2 || formatView[0] != FormatSpec::openBracket) {
return FudStatus::ArgumentInvalid;
}