summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/NameValueParser.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-12-20 16:20:54 +0100
committermadmaxoft <github@xoft.cz>2013-12-20 16:20:54 +0100
commitb66722f73532e9c1d5df71f6a2f09b5da0163dee (patch)
treefc114a5e5d062f62e91fc1f3e019259157f0c4b0 /src/HTTPServer/NameValueParser.cpp
parentAttempt at fixing cChunkDef::Height signedness. (diff)
downloadcuberite-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 '')
-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: