diff --git a/OpenChange/RTFHandler.m b/OpenChange/RTFHandler.m index c3f38e928..1e15ebaa8 100644 --- a/OpenChange/RTFHandler.m +++ b/OpenChange/RTFHandler.m @@ -694,10 +694,18 @@ const unsigned short ansicpg874[256] = { } else if (*(_bytes+1) == '*') { - while (*_bytes != '}') + int cc = 1; + + do { + if (*_bytes == '{') + cc++; + if (*_bytes == '}') + cc--; + ADVANCE; } + while (cc != 0); continue; }