Skip to content

Commit

Permalink
Fix TypeInfo_Atype::equals and ::compare in dwarf.d. Used the wrong b…
Browse files Browse the repository at this point in the history
…uffers.
  • Loading branch information
braddr committed Mar 10, 2011
1 parent 54d997a commit 712bc36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/dwarf.c
Expand Up @@ -1305,7 +1305,7 @@ int TypeInfo_Atype::equals(void *p1, void *p2)
size_t len = a1.end - a1.start;

return len == a2.end - a2.start &&
memcmp(a1.buf->buf + a1.start, a1.buf->buf + a2.start, len) == 0;
memcmp(a1.buf->buf + a1.start, a2.buf->buf + a2.start, len) == 0;
}

int TypeInfo_Atype::compare(void *p1, void *p2)
Expand All @@ -1314,7 +1314,7 @@ int TypeInfo_Atype::compare(void *p1, void *p2)
Atype a2 = *(Atype*)p2;
size_t len = a1.end - a1.start;
if (len == a2.end - a2.start)
return memcmp(a1.buf->buf + a1.start, a1.buf->buf + a2.start, len);
return memcmp(a1.buf->buf + a1.start, a2.buf->buf + a2.start, len);
else if (len < a2.end - a2.start)
return -1;
else
Expand Down

0 comments on commit 712bc36

Please sign in to comment.