diff options
author | Bastien Nocera <hadess@hadess.net> | 2015-10-04 16:10:42 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2015-10-10 14:51:08 +0200 |
commit | 753d3e8c2d2531172e781e0722ab53a9e3f27427 (patch) | |
tree | af00249e8b4df99b0db45dd10806b96ea4e365d8 | |
parent | 9f28c98189ba3756555977efd76a98987973b60f (diff) |
lua-factory: Fix setting filesizes
Filesizes are int64, therefore, don't use grl_data_add_int() for it.
https://bugzilla.gnome.org/show_bug.cgi?id=755556
-rw-r--r-- | src/lua-factory/grl-lua-library.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c index 5db3380..a33ed77 100644 --- a/src/lua-factory/grl-lua-library.c +++ b/src/lua-factory/grl-lua-library.c @@ -268,9 +268,13 @@ grl_util_add_table_to_media (lua_State *L, case G_TYPE_INT64: if (lua_isnumber (L, -1)) { gint success; - gint value = lua_tointegerx (L, -1, &success); - if (success) - grl_data_add_int (GRL_DATA (media), key_id, value); + gint64 value = lua_tointegerx (L, -1, &success); + if (success) { + if (type == G_TYPE_INT) + grl_data_add_int (GRL_DATA (media), key_id, value); + else + grl_data_add_int64 (GRL_DATA (media), key_id, value); + } } break; @@ -351,7 +355,7 @@ grl_util_build_media (lua_State *L, case G_TYPE_INT64: if (lua_isnumber (L, -1)) { gint success; - gint value = lua_tointegerx (L, -1, &success); + gint64 value = lua_tointegerx (L, -1, &success); if (success) { if (type == G_TYPE_INT) grl_data_set_int (GRL_DATA (media), key_id, value); |