Reserve more space for startup-critical resource IDs.

When regenerating the startup resource ID list I found it greatly
exceeded 400 items, resulting in ID conflicts. Bump the reservation from
400 to 800 to give sufficient room.

This also fixes a couple bugs in the scripts -- a typo that led to a
crash and a missing inclusion of a new generated .h suffix.

Bug: none
Change-Id: I34624cd0ed29593b8dba764243aea1b3cbce3ed8
Commit-Queue: Peter Kasting <>
Auto-Submit: Peter Kasting <>
Commit-Queue: Robert Flack <>
Reviewed-by: Robert Flack <>
Cr-Commit-Position: refs/heads/main@{#1148093}
GitOrigin-RevId: da12af818e4458d9ae552b6a2650d82568a2115f
diff --git a/grit/format/ b/grit/format/
index ba8a20c..da2e4af 100755
--- a/grit/format/
+++ b/grit/format/
@@ -107,7 +107,8 @@
   original_resources = {}
   for root, dirnames, filenames in os.walk(out_dir + '/gen'):
     for filename in filenames:
-      if filename.endswith(('_resources.h', '_settings.h', '_strings.h')):
+      if filename.endswith(
+          ('_resources.h', '_settings.h', '_strings.h', '_synonyms.h')):
         with open(os.path.join(root, filename)) as f:
           ReadResourceIdsFromFile(f, original_resources)
   return original_resources
diff --git a/grit/node/ b/grit/node/
index 617c1a8..4740a50 100644
--- a/grit/node/
+++ b/grit/node/
@@ -240,8 +240,8 @@
               'avoid conflicts with system-defined resource IDs.')
       if tid not in predetermined_tids and id in predetermined_ids:
-        raise exception.IdRangeOverlap('ID %d overlaps between %s and %s'
-                                       % (id, tid, predetermined_ids[tid]))
+        raise exception.IdRangeOverlap('ID %d overlaps between %s and %s' %
+                                       (id, tid, predetermined_ids[id]))
       ids[id] = tid
       tids[tid] = id