summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2013-11-01 09:59:59 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2013-11-01 09:59:59 +0000
commit7796f674229e282f3a3b877e99bc687e0ab4e02e (patch)
treefdc0ce3a101e1162347cf30f12d6e9f2809f1003 /src
parentadd clang-format file, not sure if all settings are set the way we want them ... (diff)
downloadinkscape-7796f674229e282f3a3b877e99bc687e0ab4e02e.tar.gz
inkscape-7796f674229e282f3a3b877e99bc687e0ab4e02e.zip
libcroco: Backport size checking fix (commit 209e5,aa60a)
Fixed bugs: - https://launchpad.net/bugs/1246763 (bzr r12758)
Diffstat (limited to 'src')
-rw-r--r--src/libcroco/cr-rgb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcroco/cr-rgb.c b/src/libcroco/cr-rgb.c
index e0c28701a..b9f78ddba 100644
--- a/src/libcroco/cr-rgb.c
+++ b/src/libcroco/cr-rgb.c
@@ -418,14 +418,14 @@ cr_rgb_set_from_name (CRRgb * a_this, const guchar * a_color_name)
g_return_val_if_fail (a_this && a_color_name, CR_BAD_PARAM_ERROR);
- for (i = 0; i < sizeof (gv_standard_colors); i++) {
+ for (i = 0; i < G_N_ELEMENTS (gv_standard_colors); i++) {
if (!strcmp ((char *)a_color_name, gv_standard_colors[i].name)) {
cr_rgb_set_from_rgb (a_this, &gv_standard_colors[i]);
break;
}
}
- if (i < sizeof (gv_standard_colors))
+ if (i < G_N_ELEMENTS (gv_standard_colors))
status = CR_OK;
else
status = CR_UNKNOWN_TYPE_ERROR;