diff --git a/sope-mime/NGImap4/NGImap4ResponseParser.m b/sope-mime/NGImap4/NGImap4ResponseParser.m
index 86b3045..1cb5832 100644
--- a/sope-mime/NGImap4/NGImap4ResponseParser.m
+++ b/sope-mime/NGImap4/NGImap4ResponseParser.m
@@ -2548,6 +2548,7 @@ static NSString *_parseUntil(NGImap4ResponseParser *self, char _c) {
     if (c == '\\') {
       _consume(self, 1);
       c = _la(self, 0);
+      if (c == _c) break;
     }
     buf[cnt] = c;
     _consume(self, 1);
