2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00

Fix crash when calling a member function that doesn't exist. Fixes #260.

This commit is contained in:
Steven Watanabe
2017-12-16 15:19:00 -07:00
parent a96e3fcbc5
commit 6c3397fac8
2 changed files with 15 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ LIST * evaluate_rule( RULE * rule, OBJECT * rulename, FRAME * frame )
/* Check traditional targets $(<) and sources $(>). */
if ( !rule->actions && !rule->procedure )
unknown_rule( frame, NULL, frame->module, rule->name );
unknown_rule( frame, NULL, frame->module, rulename );
/* If this rule will be executed for updating the targets then construct the
* action for make().

View File

@@ -533,7 +533,20 @@ static LIST * function_call_member_rule( JAM_FUNCTION * function, FRAME * frame,
if ( module->class_module )
{
rule = bindrule( rulename, module );
real_rulename = object_copy( function_rulename( rule->procedure ) );
if ( rule->procedure )
{
real_rulename = object_copy( function_rulename( rule->procedure ) );
}
else
{
string buf[ 1 ];
string_new( buf );
string_append( buf, object_str( module->name ) );
string_push_back( buf, '.' );
string_append( buf, object_str( rulename ) );
real_rulename = object_new( buf->value );
string_free( buf );
}
}
else
{