Skip to content

Commit 74e875a

Browse files
committed
Fix CI
1 parent 0a85c30 commit 74e875a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

LuaGObject/marshal.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,9 @@ marshal_2lua_array (lua_State *L, GITypeInfo *ti, GIDirection dir,
503503
{
504504
if (!gi_type_info_get_array_fixed_size (ti, (gsize *)&len))
505505
/* Length of the array is dynamic, get it from other
506-
argument. */
507-
len = size;
506+
argument. If the size isn't known ahead of time (it's -1),
507+
and it isn't zero-terminated, assume 1. */
508+
len = size < 0 ? 1 : size;
508509
}
509510
}
510511

0 commit comments

Comments
 (0)