riched20: Print an error instead of doing an assert(nCharOfs >= nParaOfs), to prevent wine crashing down

Louis. Lenders xerox_xerox2000 at yahoo.co.uk
Sun Jan 28 15:52:24 CST 2007


Skipped content of type multipart/alternative-------------- next part --------------
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
index 29fc309..d4a15f7 100644
--- a/dlls/riched20/run.c
+++ b/dlls/riched20/run.c
@@ -190,7 +190,8 @@ void ME_RunOfsFromCharOfs(ME_TextEditor 
   while (pPara->type == diParagraph)
   {
     nParaOfs = pPara->member.para.nCharOfs;
-    assert(nCharOfs >= nParaOfs);
+    if(!(nCharOfs >= nParaOfs))
+    ERR("the condition nCharOfs >= nParaOfs failed, this shouldn't happen!\n");
 
     if (nCharOfs < pPara->member.para.next_para->member.para.nCharOfs)
     {


More information about the wine-patches mailing list