summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-02-19 02:19:22 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-02-19 02:19:22 +0200
commit00a623e565cb60feee124394f18b32cfee3c6386 (patch)
tree9e7da7117aab8af483d2bd8710bae751464fea76 /src
parent5bdbb44a50c653a6f324d6d2355bca60e203fad0 (diff)
jvm: always null terminate strings
Diffstat (limited to 'src')
-rw-r--r--src/fakejvm/jvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fakejvm/jvm.c b/src/fakejvm/jvm.c
index f71412f..baf097c 100644
--- a/src/fakejvm/jvm.c
+++ b/src/fakejvm/jvm.c
@@ -35,7 +35,7 @@ jvm_string_set_cstr_with_length(struct jvm_string *string, const char *data, con
assert(string);
char *copy = (char*)data;
- if (heap && data && len > 0 && !(copy = ccopy(data, len, data[len] != 0)))
+ if (heap && data && len > 0 && !(copy = ccopy(data, len, true)))
return false;
jvm_string_release(string);