summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2011-02-15 11:35:37 -0500
committerDavid Zeuthen <davidz@redhat.com>2011-02-15 11:35:37 -0500
commitfcd14e912fd156e0a0ec2622e751a2c639a9b41d (patch)
tree04c96c52bc3b63560813be7a0d9c7f41ca76b5a1
parent51d801027d7e2b0a0ce270875f9bf13dd227b752 (diff)
Fix bug in array string comparison when passing two NULL values
We want _g_strv_equal0 (NULL, NULL) to return TRUE. Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r--src/codegen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen.py b/src/codegen.py
index a488bce..6a8d343 100644
--- a/src/codegen.py
+++ b/src/codegen.py
@@ -90,7 +90,10 @@ class CodeGenerator:
' gboolean ret = FALSE;\n'
' guint n;\n'
' if (a == NULL && b == NULL)\n'
- ' goto out;\n'
+ ' {\n'
+ ' ret = TRUE;\n'
+ ' goto out;\n'
+ ' }\n'
' if (a == NULL || b == NULL)\n'
' goto out;\n'
' if (g_strv_length (a) != g_strv_length (b))\n'