summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2015-03-27 18:14:03 +1300
committerOlly Betts <olly@survex.com>2015-03-27 18:14:03 +1300
commit6b6b360093ada3a429a4cecf2ef8227139c0febc (patch)
tree560ec5a3faddf4c59b887f4e79e98d46c6dc2e4b
parent38a75a22c94830c84c20aebe0a7f36955b476985 (diff)
downloadswig-6b6b360093ada3a429a4cecf2ef8227139c0febc.tar.gz
Fix segfault in handling unknown directives
-rw-r--r--Source/CParse/cscanner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CParse/cscanner.c b/Source/CParse/cscanner.c
index d86c4590a..a33a81062 100644
--- a/Source/CParse/cscanner.c
+++ b/Source/CParse/cscanner.c
@@ -886,7 +886,7 @@ int yylex(void) {
return (WARN);
/* Note down the apparently unknown directive for error reporting. */
- cparse_unknown_directive = Swig_copy_string(yytext);
+ cparse_unknown_directive = NewString(yytext);
}
/* Have an unknown identifier, as a last step, we'll do a typedef lookup on it. */