From 45196cad177649d398dd5ee853a2ec0eac812cc8 Mon Sep 17 00:00:00 2001 From: johannes-nivus Date: Wed, 11 Mar 2020 18:08:01 +0100 Subject: [PATCH] tools/nxstyle.c: Check for missing space before closing comment faulty (#543) *Addresses Issue #540, check for missing space before closing comment was faulty --- tools/nxstyle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nxstyle.c b/tools/nxstyle.c index 98b392619f..f37972450d 100644 --- a/tools/nxstyle.c +++ b/tools/nxstyle.c @@ -1471,7 +1471,7 @@ int main(int argc, char **argv, char **envp) { ERROR("Closing C comment not indented", lineno, n); } - else if (!isspace((int)line[n + 1]) && line[n - 2] != '*') + else if (!isspace((int)line[n - 2]) && line[n - 2] != '*') { ERROR("Missing space before closing C comment", lineno, n); @@ -1974,7 +1974,7 @@ int main(int argc, char **argv, char **envp) case '/': - /* C comment terminator*/ + /* C comment terminator */ if (line[n - 1] == '*') {