Fix crash in Makefile parser when trying to read defines.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3441 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
4b9851962f
commit
b5aee22fbe
@ -3,6 +3,8 @@
|
|||||||
* src/support.h:
|
* src/support.h:
|
||||||
Prevent compile errors in plugins when GETTEXT_PACKAGE is not
|
Prevent compile errors in plugins when GETTEXT_PACKAGE is not
|
||||||
defined.
|
defined.
|
||||||
|
* tagmanager/make.c:
|
||||||
|
Fix crash in Makefile parser when trying to read defines.
|
||||||
|
|
||||||
|
|
||||||
2009-01-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
2009-01-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
|
@ -110,9 +110,13 @@ static void newMacro (vString *const name)
|
|||||||
static void newMacroFromDefine (vString *const name)
|
static void newMacroFromDefine (vString *const name)
|
||||||
{
|
{
|
||||||
/* name is something like "define JAVAHPP_RULE", find the space and jump to the next char */
|
/* name is something like "define JAVAHPP_RULE", find the space and jump to the next char */
|
||||||
vStringCopyS (name, strchr (vStringValue (name), ' ') + 1);
|
char *name_val = strchr (vStringValue (name), ' ');
|
||||||
|
|
||||||
|
if (name_val != NULL) {
|
||||||
|
vStringCopyS (name, name_val + 1);
|
||||||
makeSimpleTag (name, MakeKinds, K_MACRO);
|
makeSimpleTag (name, MakeKinds, K_MACRO);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void readIdentifier (const int first, vString *const id)
|
static void readIdentifier (const int first, vString *const id)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user