Skip to content

Commit

Permalink
[hlmem] prevent unexpected null from TType.toString
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Jan 15, 2025
1 parent d38ad32 commit 587ef0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions other/haxelib/hlmem/Memory.hx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Memory {
public function getTypeString( id : Int, withTstr : Bool, withId : Bool, withField : Bool ) : String {
var tid = id & 0xFFFFFF;
var t = types[tid];
var tstr = withTstr ? t.toString() : "";
var tstr = withTstr ? "" + t.toString() : "";
if( withId )
tstr += Analyzer.withColor("#" + tid, Magenta);
var fid = id >>> 24;
Expand Down Expand Up @@ -603,7 +603,7 @@ class Memory {
public function getFalsePositives( ?typeStr : String ) : FalsePositiveStats {
var ctx = new FalsePositiveStats();
for( t in types )
if( t.falsePositive > 0 && (typeStr == null || t.toString().indexOf(typeStr) >= 0) ) {
if( t.falsePositive > 0 && (typeStr == null || ("" + t.toString()).indexOf(typeStr) >= 0) ) {
ctx.add(t);
}
ctx.sort();
Expand Down

0 comments on commit 587ef0e

Please sign in to comment.