Fix system test compile error

if there is no semicolon in the file, first_semicolon is nil, so check
it before using it.
This commit is contained in:
laurensmiers
2020-01-09 22:00:41 +01:00
parent cfe1b4ef3d
commit cf0e55b6e4
+1 -1
View File
@@ -174,7 +174,7 @@ class CMockHeaderParser
first_open_bracket = inline_function_match.post_match.index("{")
first_semicolon = inline_function_match.post_match.index(";")
if first_open_bracket.nil? or first_semicolon < first_open_bracket
if first_open_bracket.nil? or (!first_semicolon.nil? and first_semicolon < first_open_bracket)
puts "DECLARATION, IGNORE"
source = inline_function_match.pre_match + inline_function_match.post_match
next