mirror of
https://github.com/corda/corda.git
synced 2025-01-27 14:49:35 +00:00
respect string offset and length when printing exception message
This commit is contained in:
parent
b33f0c311d
commit
051e3bc7a8
@ -3973,8 +3973,13 @@ run(Thread* t)
|
||||
(t, className(t, objectClass(exception)), 0));
|
||||
|
||||
if (throwableMessage(t, exception)) {
|
||||
fprintf(stderr, ": %s\n", &byteArrayBody
|
||||
(t, stringBytes(t, throwableMessage(t, exception)), 0));
|
||||
object m = throwableMessage(t, exception);
|
||||
char message[stringLength(t, m) + 1];
|
||||
memcpy(message,
|
||||
&byteArrayBody(t, stringBytes(t, m), stringOffset(t, m)),
|
||||
stringLength(t, m));
|
||||
message[stringLength(t, m)] = 0;
|
||||
fprintf(stderr, ": %s\n", message);
|
||||
} else {
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user