Fix crash on missing method
This commit is contained in:
@@ -369,7 +369,7 @@ UniValue CClib(struct CCcontract_info *cp,char *method,char *jsonstr)
|
||||
}
|
||||
}
|
||||
result.push_back(Pair("result","error"));
|
||||
result.push_back(Pair("method",CClib_methods[i].method));
|
||||
result.push_back(Pair("method",method));
|
||||
result.push_back(Pair("error","method not found"));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,6 @@ if ( cp->evalcode == EVAL_GAMES ) \
|
||||
return(games_settle(txfee,cp,params)); \
|
||||
else \
|
||||
{ \
|
||||
fprintf(stderr,"invalid method (%s)\n",method); \
|
||||
result.push_back(Pair("result","error")); \
|
||||
result.push_back(Pair("error","invalid gamescc method")); \
|
||||
return(result); \
|
||||
|
||||
Reference in New Issue
Block a user