tools/nxstyle.c: Check for missing space before closing comment faulty (#543)

*Addresses Issue #540, check for missing space before closing comment was faulty
This commit is contained in:
johannes-nivus 2020-03-11 18:08:01 +01:00 committed by GitHub
parent 295fa015bc
commit 45196cad17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1471,7 +1471,7 @@ int main(int argc, char **argv, char **envp)
{ {
ERROR("Closing C comment not indented", lineno, n); 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, ERROR("Missing space before closing C comment", lineno,
n); n);
@ -1974,7 +1974,7 @@ int main(int argc, char **argv, char **envp)
case '/': case '/':
/* C comment terminator*/ /* C comment terminator */
if (line[n - 1] == '*') if (line[n - 1] == '*')
{ {