callbacks: Fix set size array size
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 Jan 2012 20:27:06 +0000 (15:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 Jan 2012 20:27:06 +0000 (15:27 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
converter/babeltrace-lib.c

index 3e77f1f3608fbf25befded5bcd2d6a7a62246d38..9b01281f3438c5c328e4650897e5ec53f0865c30 100644 (file)
@@ -190,7 +190,7 @@ int babeltrace_iter_add_callback(struct babeltrace_iter *iter,
 
                                /* find or create the bt_callback_chain for this event */
                                if (event_id >= bt_stream_cb->per_id_callbacks->len) {
 
                                /* find or create the bt_callback_chain for this event */
                                if (event_id >= bt_stream_cb->per_id_callbacks->len) {
-                                       g_array_set_size(bt_stream_cb->per_id_callbacks, event_id);
+                                       g_array_set_size(bt_stream_cb->per_id_callbacks, event_id + 1);
                                }
                                bt_chain = &g_array_index(bt_stream_cb->per_id_callbacks,
                                                struct bt_callback_chain, event_id);
                                }
                                bt_chain = &g_array_index(bt_stream_cb->per_id_callbacks,
                                                struct bt_callback_chain, event_id);
This page took 0.025688 seconds and 4 git commands to generate.