diff --git a/src/Multipart.h b/src/Multipart.h index c5027c5..1259c5f 100644 --- a/src/Multipart.h +++ b/src/Multipart.h @@ -108,6 +108,11 @@ namespace uWS { quoteLength++; } + /* We can't remove_prefix if we have nothing to remove */ + if (!remainingLine.length()) { + return {}; + } + remainingLine.remove_prefix(1); return quote.substr(0, quoteLength); } else {