Mercurial > repos > rhope
diff runtime/object.c @ 12:31f8182f3433
Finished fib test and did some small work on the c backend
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 25 May 2009 23:34:36 -0400 |
parents | d61550e2c001 |
children | 914ad38f9b59 |
line wrap: on
line diff
--- a/runtime/object.c Tue May 19 23:29:55 2009 -0400 +++ b/runtime/object.c Mon May 25 23:34:36 2009 -0400 @@ -307,7 +307,7 @@ fprintf(stderr, "Couldn't allocate %d bytes for method lookup table\n", sizeof(rhope_func) * INITIAL_METHOD_LOOKUP); exit(-1); } - if(methodid - BELOW_INITIAL_METHOD < 1) { + if(BELOW_INITIAL_METHOD > methodid) { bp->first_methodid = 1; bp->last_methodid = 1+INITIAL_METHOD_LOOKUP; } else { @@ -336,7 +336,7 @@ exit(-1); } memset(bp->method_lookup+bp->last_methodid, '\0', (methodid+1)-bp->last_methodid); - bp->last_methodid = methodid; + bp->last_methodid = methodid+1; } } bp->method_lookup[methodid-bp->first_methodid] = impl;