aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-02-04 16:01:35 +0100
committerfiaxh <git@lightrise.org>2019-02-04 16:01:35 +0100
commit084653cfc2986cd52ffd42b347f63ca3391e6ece (patch)
tree90bc8437e164ef0b54d65e609f6ced8543046f36 /xmpp-vala
parent8e9e05615c2a59d37d189efd414d2b8d2a31b533 (diff)
downloaddino-084653cfc2986cd52ffd42b347f63ca3391e6ece.tar.gz
dino-084653cfc2986cd52ffd42b347f63ca3391e6ece.zip
Fix compiler error (From using uint8[].copy())
Diffstat (limited to 'xmpp-vala')
-rw-r--r--xmpp-vala/src/core/stanza_reader.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/stanza_reader.vala b/xmpp-vala/src/core/stanza_reader.vala
index 43c453ff..72aa0b5f 100644
--- a/xmpp-vala/src/core/stanza_reader.vala
+++ b/xmpp-vala/src/core/stanza_reader.vala
@@ -257,8 +257,8 @@ public class StanzaReader {
ns_state = ns_state.pop();
return res;
} catch (XmlError e) {
- uint8[] buffer_cpy = buffer.copy();
- buffer_cpy += '\0';
+ uint8[] buffer_cpy = new uint8[buffer.length + 1];
+ Memory.copy(buffer_cpy, buffer, buffer.length);
warning("XmlError at: %s".printf((string)buffer_cpy) + "\n");
throw e;
}