bug in vanilla BlameBarack: isolate [init-val]

Ger Hobbelt <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
/init-val/ should work as before, but the new documented [init-val] style won't:

GerH BlameBarack has the fix: when you get b1 data, you shouldn't
still use the s1 len 'cause it'll be zero. That's why I appreciate
test cases. Or thorough code reviews.

--- \\Debbie\ger\prj\1original\crm114\src\crm114.sourceforge.net\src\crm_expr_isolate.c	2008-09-24
12:25:27.000000000 +-0100
+++ \\Debbie\ger\prj\3actual\crm114\src\crm_expr_isolate.c	2009-02-01
19:11:58.000000000 +-0100
@@ -166,5 +168,5 @@
-		      if (internal_trace)
-			fprintf (stderr, "using the slash-value given.\n");
-		      vallen = crm_nexpandvar(tempbuf, apb->s1len,
-					      data_window_size - tdw->nchars);
-		    };
+                        if (internal_trace)
+                            fprintf(stderr, "using the slash-value given.\n");
+                        CRM_ASSERT(tempbuf[vallen] == 0);
+                        vallen = crm_nexpandvar(tempbuf, vallen,
data_window_size - tdw->nchars, vht, tdw);
+                    }


-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
        http://www.hebbut.net/
mail:   [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.