From 595dd60546b578f007325ac5680b86ccc0b0bacb Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sun, 22 May 2011 12:21:14 +0000 Subject: [PATCH] Fix off-by-one error in trimming space from the right of strings This commit was SVN r24724. --- ompi/tools/ompi_info/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/tools/ompi_info/output.c b/ompi/tools/ompi_info/output.c index 5292313674..591d5da0ff 100644 --- a/ompi/tools/ompi_info/output.c +++ b/ompi/tools/ompi_info/output.c @@ -105,7 +105,7 @@ void ompi_info_out(const char *pretty_message, const char *plain_message, const while (isspace(v[i]) && i > 0) { --i; } - v[i] = '\0'; + v[i + 1] = '\0'; } if (ompi_info_pretty && NULL != pretty_message) {