Merge pull request #1326 from BrzVlad/master
authorMark Probst <mark.probst@gmail.com>
Thu, 9 Oct 2014 18:43:03 +0000 (11:43 -0700)
committerMark Probst <mark.probst@gmail.com>
Thu, 9 Oct 2014 18:43:03 +0000 (11:43 -0700)
[sgen] Fix pointer access.

mono/metadata/sgen-pointer-queue.c

index f99c5bc5ced23aef4155f8645b7e2a9483de06cf..3c1d8fb6c61d8d036a670924fd68f6c768984acb 100644 (file)
@@ -98,7 +98,7 @@ sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue)
        end = queue->data + queue->next_slot;
        while (cur < end) {
                *start = *cur++;
-               while (*start == *cur && cur < end)
+               while (cur < end && *start == *cur)
                        cur++;
                start++;
        };