Fix seg fault when parsing:
%inline {
and no closing brace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9123 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6251ece095
commit
beb007b72c
1 changed files with 2 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ typedef struct InFile {
|
||||||
struct InFile *prev;
|
struct InFile *prev;
|
||||||
} InFile;
|
} InFile;
|
||||||
|
|
||||||
InFile *in_head;
|
static InFile *in_head;
|
||||||
|
|
||||||
DOHFile *LEX_in = 0;
|
DOHFile *LEX_in = 0;
|
||||||
static DOHString *header = 0;
|
static DOHString *header = 0;
|
||||||
|
|
@ -262,6 +262,7 @@ void retract(int n) {
|
||||||
void start_inline(char *text, int line) {
|
void start_inline(char *text, int line) {
|
||||||
InFile *in;
|
InFile *in;
|
||||||
|
|
||||||
|
if (!in_head) return;
|
||||||
/* Save current state */
|
/* Save current state */
|
||||||
in_head->line_number = cparse_line;
|
in_head->line_number = cparse_line;
|
||||||
in_head->in_file = cparse_file;
|
in_head->in_file = cparse_file;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue