]> git.sesse.net Git - cubemap/blobdiff - httpinput.cpp
Add an assert, to hopefully catch a bug.
[cubemap] / 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);
+       assert(pending_data.size() >= num_bytes);
        pending_data.erase(pending_data.begin(), pending_data.begin() + num_bytes);
 }