Fix compiler error (From using uint8[].copy())

This commit is contained in:
fiaxh 2019-02-04 16:01:35 +01:00
parent 8e9e05615c
commit 084653cfc2

View file

@ -257,8 +257,8 @@ public class StanzaReader {
ns_state = ns_state.pop(); ns_state = ns_state.pop();
return res; return res;
} catch (XmlError e) { } catch (XmlError e) {
uint8[] buffer_cpy = buffer.copy(); uint8[] buffer_cpy = new uint8[buffer.length + 1];
buffer_cpy += '\0'; Memory.copy(buffer_cpy, buffer, buffer.length);
warning("XmlError at: %s".printf((string)buffer_cpy) + "\n"); warning("XmlError at: %s".printf((string)buffer_cpy) + "\n");
throw e; throw e;
} }