summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gen-script-for-lang.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/gen-script-for-lang.c b/tools/gen-script-for-lang.c
index 7de3c98d..2f439a4e 100644
--- a/tools/gen-script-for-lang.c
+++ b/tools/gen-script-for-lang.c
@@ -289,7 +289,13 @@ int main (void)
for (j = 0; j < MAX_SCRIPTS; j++)
{
if (!info->scripts[j].freq)
- break;
+ {
+ /* Avoid generating code with empty arrays */
+ if (j == 0)
+ g_print ("0");
+
+ break;
+ }
if (j != 0)
g_print (", ");