diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-09-24 14:24:52 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-09-24 14:24:52 +0200 |
commit | b7798d6f7ffdaae41c7eedc32d97210b2f688894 (patch) | |
tree | 4fc8f1fce156a12365a8793364c47247b86ae38f /ufo/ufo-buffer.c | |
parent | 581c22cada9e851682ce68781b3aa8166b004d06 (diff) |
Fix ufo_buffer_new_with_data
The initial location of the new buffer was not set correctly.
Diffstat (limited to 'ufo/ufo-buffer.c')
-rw-r--r-- | ufo/ufo-buffer.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ufo/ufo-buffer.c b/ufo/ufo-buffer.c index 2fb6ad5..a2fa860 100644 --- a/ufo/ufo-buffer.c +++ b/ufo/ufo-buffer.c @@ -109,6 +109,14 @@ struct _UfoBufferPrivate { }; static void +update_location (UfoBufferPrivate *priv, + UfoBufferLocation new_location) +{ + priv->last_location = priv->location; + priv->location = new_location; +} + +static void copy_requisition (UfoRequisition *src, UfoRequisition *dst) { @@ -321,6 +329,7 @@ ufo_buffer_new_with_data (UfoRequisition *requisition, priv->free = FALSE; priv->host_array = data; + update_location (priv, UFO_BUFFER_LOCATION_HOST); return buffer; } @@ -714,14 +723,6 @@ update_last_queue (UfoBufferPrivate *priv, priv->last_queue = queue; } -static void -update_location (UfoBufferPrivate *priv, - UfoBufferLocation new_location) -{ - priv->last_location = priv->location; - priv->location = new_location; -} - /** * ufo_buffer_set_host_array: * @buffer: A #UfoBuffer |