Skip to content

Commit

Permalink
Improve write fail message
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Apr 19, 2024
1 parent b85b73a commit d3ddea1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hld/HLDebugApi.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class HLDebugApi implements Api {
public function writeByte( ptr : Pointer, pos : Int, value : Int ) : Void {
tmp.setUI8(0, value & 0xFF);
if( !write(ptr.offset(pos), cast tmp, 1) )
throw "Failed to write @" + ptr.toString();
throw "Failed to write @" + ptr.offset(pos).toString();
}

public function flush( ptr : Pointer, size : Int ) : Bool {
Expand Down
2 changes: 1 addition & 1 deletion hld/NodeDebugApiNative.hx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class NodeDebugApiNative implements Api {
public function writeByte( ptr : Pointer, pos : Int, value : Int ) : Void {
tmpByte.setUI8(0, value & 0xFF);
if( !write(ptr.offset(pos), tmpByte, 1) )
throw "Failed to write @" + ptr.toString();
throw "Failed to write @" + ptr.offset(pos).toString();
}

public function flush( ptr : Pointer, size : Int ) : Bool {
Expand Down

0 comments on commit d3ddea1

Please sign in to comment.