aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}