summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/NameValueParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/HTTPServer/NameValueParser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/HTTPServer/NameValueParser.cpp b/src/HTTPServer/NameValueParser.cpp
index a27f07d19..fd56f6b24 100644
--- a/src/HTTPServer/NameValueParser.cpp
+++ b/src/HTTPServer/NameValueParser.cpp
@@ -97,15 +97,17 @@ void cNameValueParser::Parse(const char * a_Data, int a_Size)
{
ASSERT(m_State != psFinished); // Calling Parse() after Finish() is wrong!
- if ((m_State == psInvalid) || (m_State == psFinished))
- {
- return;
- }
int Last = 0;
for (int i = 0; i < a_Size;)
{
switch (m_State)
{
+ case psInvalid:
+ case psFinished:
+ {
+ return;
+ }
+
case psKeySpace:
{
// Skip whitespace until a non-whitespace is found, then start the key: