Re: 3.0.3 Release Candidate for Windows/DOS

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
> 
> 
> Again, I tested with the EXW interpreter on Windows XP.
> There is another bug in match_from():
> }}}
<eucode>
> sequence s
> object x
> s = "abcde"
> x = "e"
> 
> ? match(x, s)
> ? match_from(x, s, 0)
> ? match_from(x, s, 1)
> ? match_from(x, s, 2)
> ? match_from(x, s, 3)
> ? match_from(x, s, 4)
> ? match_from(x, s, 5)
> ? match_from(x, s, 6)
> </eucode>
{{{

> 

Thanks for testing this.  I've made the fix to match_from, and committed to
svn.  Another fairly simple bug.

Index: be_runtime.c
===================================================================
--- be_runtime.c        (revision 105)
+++ be_runtime.c        (working copy)
@@ -4691,10 +4691,11 @@

     if (lengthb < c )  // should this be an error?
        return (0);
+
     b1 = b->base;
-    bp = b1 + c -1;
+    bp = b1 + c - 1;
     a1 = a->base;
-    ntries = lengthb - lengtha  - c + 1;
+    ntries = lengthb - lengtha  - c + 2;
     while (--ntries >= 0) {
        ai = a1;
        bi = bp;


Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu