[seed] Fix seed_object_copy_property_names ().
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] Fix seed_object_copy_property_names ().
- Date: Sat, 17 Jul 2010 21:26:42 +0000 (UTC)
commit 9c98a38779f47aa7eb7a82db9ea45b20c0b16056
Author: Steve Frécinaux <code istique net>
Date: Fri Jul 16 20:46:16 2010 +0200
Fix seed_object_copy_property_names ().
Due to a typo, it only returned up to n-1 chars for each property names,
where n is the amount of properties the object has, making it unusable.
https://bugzilla.gnome.org/show_bug.cgi?id=624562
libseed/seed-api.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libseed/seed-api.c b/libseed/seed-api.c
index e83c97d..404d583 100644
--- a/libseed/seed-api.c
+++ b/libseed/seed-api.c
@@ -785,7 +785,7 @@ seed_object_copy_property_names (JSContextRef ctx, JSObjectRef object)
name = JSPropertyNameArrayGetNameAtIndex (names, i);
max_length = JSStringGetMaximumUTF8CStringSize (name);
c_name = (gchar *) g_malloc (max_length * sizeof (gchar));
- JSStringGetUTF8CString (name, c_name, length);
+ JSStringGetUTF8CString (name, c_name, max_length);
ret[i] = c_name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]