Commit 09c7fd7f7ccb12921c32bbaad67af3e5bbef1a2e

Martin Mitas 2016-11-25T15:17:01

md_text_with_null_replacement: Fix endless loop on a NULL character.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/md4c/md4c.c b/md4c/md4c.c
index bbc6cfb..fdd4b52 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -327,6 +327,7 @@ md_text_with_null_replacement(MD_CTX* ctx, MD_TEXTTYPE type, const CHAR* str, SZ
         ret = ctx->r.text(MD_TEXT_NULLCHAR, _T(""), 1, ctx->userdata);
         if(ret != 0)
             return ret;
+        off++;
     }
 }