pipe-loader: fix off-by one error
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 Nov 2015 21:37:51 +0000 (21:37 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 25 Nov 2015 20:22:35 +0000 (20:22 +0000)
With earlier commit we've dropped the manual iteration over the fixed
size array and prepemtively set the variable storing the size, that is
to be returned. Yet we forgot to adjust the comparison, as before we
were comparing the index, now we're comparing the size.

Fixes: ff9cd8a67ca "pipe-loader: directly use
pipe_loader_sw_probe_null() at probe time"
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93091
Reported-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c

index 5539a730b4c1f62252db0efde955dcf34010ddcf..091d4d6997df69d909b1ac8865c0d42fea4f1020 100644 (file)
@@ -222,7 +222,7 @@ pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev)
 {
    int i = 1;
 
-   if (i < ndev) {
+   if (i <= ndev) {
       if (!pipe_loader_sw_probe_null(devs)) {
          i--;
       }