summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-06-05 12:12:07 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-06-06 15:47:07 +0800
commit024d17ffa14e00cce07457805cd7f9a40389d053 (patch)
tree381cf20ba6b19d02ed9b7173eff534dba2a34a90
parent1355b656207cb19f08872112d1bdbb89c3496fa2 (diff)
downloadpango-024d17ffa14e00cce07457805cd7f9a40389d053.tar.gz
tools/gen-script-for-lang.c: Avoid generating code with empty arrays
Empty arrays are one of the C99 features that is not currently supported by any Visual Studio versions. Avoid doing so.
-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 (", ");