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