Skip to content

Commit

Permalink
Fix eval error when part of path can be found
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Mar 21, 2024
1 parent d3e38d9 commit cc855b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hld/Eval.hx
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ class Eval {
return v;
}
var v = getGlobalAddress(path);
if( v == null || v == ANone ) throw "Unknown value "+path.join(".");
if( v == ANone ) throw "Unknown value "+path.join(".");
return fetchAddr(v);
}

Expand All @@ -720,7 +720,7 @@ class Eval {
if( g == null )
return ANone;
var addr = AAddr(jit.globals.offset(g.offset), g.type);
while( path.length > 0 )
while( addr != ANone && path.length > 0 )
addr = readFieldAddress(fetchAddr(addr), path.shift());
return addr;
}
Expand Down

0 comments on commit cc855b1

Please sign in to comment.