r600: fix off-by-one in egd_tables.py
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 12 Jun 2017 19:31:43 +0000 (21:31 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 19 Jun 2017 10:05:12 +0000 (12:05 +0200)
Port of the corresponding fix in sid_tables.py.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/r600/egd_tables.py

index 4c606025ba70ab71d4448f95f229656f1e0eeb7d..d7b78c7fb16045681c13273ce82178926e87fc7f 100644 (file)
@@ -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' % (