diff options
author | madmaxoft <github@xoft.cz> | 2013-12-20 16:20:54 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-12-20 16:20:54 +0100 |
commit | b66722f73532e9c1d5df71f6a2f09b5da0163dee (patch) | |
tree | fc114a5e5d062f62e91fc1f3e019259157f0c4b0 /src/HTTPServer/NameValueParser.cpp | |
parent | Attempt at fixing cChunkDef::Height signedness. (diff) | |
download | cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.tar cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.tar.gz cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.tar.bz2 cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.tar.lz cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.tar.xz cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.tar.zst cuberite-b66722f73532e9c1d5df71f6a2f09b5da0163dee.zip |
Diffstat (limited to 'src/HTTPServer/NameValueParser.cpp')
-rw-r--r-- | src/HTTPServer/NameValueParser.cpp | 10 |
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: |