[Bf-blender-cvs] [bc9e05599de] master: Fix makesdna not respecting C++ comments

Julian Eisel noreply at git.blender.org
Wed Apr 18 00:33:04 CEST 2018


Commit: bc9e05599de025dbcaa5cd006c332c9d343d49d1
Author: Julian Eisel
Date:   Wed Apr 18 00:29:53 2018 +0200
Branches: master
https://developer.blender.org/rBbc9e05599de025dbcaa5cd006c332c9d343d49d1

Fix makesdna not respecting C++ comments

Tab after C++ comment broke parsing and didn't remove the line at all.
Was there since 2002 at least, probably confused some peeps.

This means commented out code was actually written to SDNA.

===================================================================

M	source/blender/makesdna/intern/makesdna.c

===================================================================

diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 92d54e25829..a14ed168b69 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -464,7 +464,7 @@ static int preprocess_include(char *maindata, int len)
 		if (cp[0] == '/' && cp[1] == '/') {
 			comment = 1;
 		}
-		else if (*cp < 32) {
+		else if (*cp == '\n') {
 			comment = 0;
 		}
 		if (comment || *cp < 32 || *cp > 128) *cp = 32;



More information about the Bf-blender-cvs mailing list