Fixed comparison of registers
This commit is contained in:
parent
05a3c1b30f
commit
92bc8e2f4c
|
@ -1,5 +1,4 @@
|
|||
<> (a) (apple)
|
||||
<> (b) (banana)
|
||||
<> (apple banana) (fruit salad)
|
||||
<> (eq ?x ?x) (#t)
|
||||
<> (eq ?x ?y) (#f)
|
||||
|
||||
a b
|
||||
(eq foo bar) (eq foo foo)
|
|
@ -36,7 +36,7 @@ static int
|
|||
compare(char *a, char *b)
|
||||
{
|
||||
int i = 0, al = walk(a) - a, bl = walk(b) - b;
|
||||
if(al != bl)
|
||||
if(al != bl) return 0;
|
||||
while(a[i] == b[i])
|
||||
if(!a[i] || ++i >= al) return 1;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue