File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " frida-cshell" ,
3- "version" : " 1.5.2 " ,
3+ "version" : " 1.5.3 " ,
44 "description" : " Frida's CShell" ,
55 "scripts" : {
66 "prepare" : " npm run build && npm run version && npm run package && npm run copy" ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ m name ${CmdLet.DELETE_CHAR} - delete a macro
106106 return Var . ZERO ;
107107 }
108108
109- public static run ( macro : Macro ) : Var {
109+ public static runSync ( macro : Macro ) : Var {
110110 let ret = Var . ZERO ;
111111 for ( const command of macro . commands ) {
112112 if ( command . length === 0 ) continue ;
Original file line number Diff line number Diff line change @@ -17,19 +17,24 @@ export class Command {
1717
1818 const macro = this . getMacro ( tokens ) ;
1919 if ( macro !== null ) {
20- return MacroCmdLet . run ( macro ) ;
20+ return MacroCmdLet . runSync ( macro ) ;
2121 }
2222
2323 return this . runFunction ( tokens ) ;
2424 }
2525
2626 public static runSync ( tokens : Token [ ] ) : Var {
2727 const cmdlet = this . getCmdlet ( tokens ) ;
28- if ( cmdlet === null ) {
29- return this . runFunction ( tokens ) ;
30- } else {
28+ if ( cmdlet !== null ) {
3129 return cmdlet . runSync ( tokens . slice ( 1 ) ) ;
3230 }
31+
32+ const macro = this . getMacro ( tokens ) ;
33+ if ( macro !== null ) {
34+ return MacroCmdLet . runSync ( macro ) ;
35+ }
36+
37+ return this . runFunction ( tokens ) ;
3338 }
3439
3540 private static getCmdlet ( tokens : Token [ ] ) : CmdLet | null {
@@ -45,7 +50,8 @@ export class Command {
4550 if ( ! name . startsWith ( Command . MACRO_PREFIX ) ) return null ;
4651 if ( name . length === 1 ) throw new Error ( 'macro name not supplied' ) ;
4752 const macro = Macros . get ( name . slice ( 1 ) ) ;
48- if ( macro === null ) throw new Error ( `failed to recognozie macro ${ Output . green ( name ) } ` ) ;
53+ if ( macro === null )
54+ throw new Error ( `failed to recognozie macro ${ Output . green ( name ) } ` ) ;
4955 return macro ;
5056 }
5157
You can’t perform that action at this time.
0 commit comments