mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-21 02:29:56 +00:00
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:
@@ -174,7 +174,7 @@ class CMockHeaderParser
|
|||||||
first_open_bracket = inline_function_match.post_match.index("{")
|
first_open_bracket = inline_function_match.post_match.index("{")
|
||||||
first_semicolon = 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"
|
puts "DECLARATION, IGNORE"
|
||||||
source = inline_function_match.pre_match + inline_function_match.post_match
|
source = inline_function_match.pre_match + inline_function_match.post_match
|
||||||
next
|
next
|
||||||
|
|||||||
Reference in New Issue
Block a user