Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/util/logger.cpp
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ namespace rubinius {
char* end = (char*)memchr(message, '\0', LOGGER_MSG_SIZE);
size_t bytes = end ? end - message : LOGGER_MSG_SIZE;

if(LOGGER_MSG_SIZE - bytes > 1) {
if(bytes + 1 < LOGGER_MSG_SIZE) {
if(message[bytes-1] != '\n') {
message[bytes] = '\n';
message[bytes += 1] = '\0';

0 comments on commit 99579cb

Please sign in to comment.