]> git.sesse.net Git - cubemap/commitdiff
Add an assert, to hopefully catch a bug.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 13 Aug 2013 09:13:38 +0000 (11:13 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 13 Aug 2013 09:13:38 +0000 (11:13 +0200)
httpinput.cpp

index 275df501f6fb9c92b44d3023091852076595ec40..6de67b251cc4b132c75146b7a2927dda541205f3 100644 (file)
@@ -491,6 +491,7 @@ void HTTPInput::drop_pending_data(size_t num_bytes)
        }
        log(WARNING, "[%s] Dropping %lld junk bytes from stream, maybe it is not a Metacube stream?",
                url.c_str(), (long long)num_bytes);
        }
        log(WARNING, "[%s] Dropping %lld junk bytes from stream, maybe it is not a Metacube stream?",
                url.c_str(), (long long)num_bytes);
+       assert(pending_data.size() >= num_bytes);
        pending_data.erase(pending_data.begin(), pending_data.begin() + num_bytes);
 }
 
        pending_data.erase(pending_data.begin(), pending_data.begin() + num_bytes);
 }