Mesa (master): r600: fix off-by-one in egd_tables.py

Nicolai Hähnle nh at kemper.freedesktop.org
Mon Jun 19 10:07:26 UTC 2017


Module: Mesa
Branch: master
Commit: 4d5bb1b9877aecaefec53fca231a3df25e101e9a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d5bb1b9877aecaefec53fca231a3df25e101e9a

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Mon Jun 12 21:31:43 2017 +0200

r600: fix off-by-one in egd_tables.py

Port of the corresponding fix in sid_tables.py.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/r600/egd_tables.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py
index 4c606025ba..d7b78c7fb1 100644
--- a/src/gallium/drivers/r600/egd_tables.py
+++ b/src/gallium/drivers/r600/egd_tables.py
@@ -110,7 +110,7 @@ class IntTable:
         [static] const typename name[] = { ... };
         to filp.
         """
-        idxs = sorted(self.idxs) + [-1]
+        idxs = sorted(self.idxs) + [len(self.table)]
 
         fragments = [
             ('\t/* %s */ %s' % (




More information about the mesa-commit mailing list