Skip to content

Commit

Permalink
Added ability to read unsignedInts (DWORD)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatino committed Jul 14, 2016
1 parent ad28e6c commit c192752
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/beaudoin/jmm/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final class Main {

public static void main(String[] args) throws IOException {
NativeProcess proc = NativeProcess.byName("C__Stuff.exe");
System.out.println(proc.readInt(0x61ff1c));
//System.out.println(proc.readInt(0x61ff1c));
}

}
4 changes: 4 additions & 0 deletions src/main/java/com/beaudoin/jmm/process/ReadableRegion.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ default int readInt(long address) {
return read(address, 4).getInt();
}

default long readUnsignedInt(long address) {
return Integer.toUnsignedLong(read(address, 4).getInt());
}

default long readLong(long address) {
return read(address, 8).getLong();
}
Expand Down

0 comments on commit c192752

Please sign in to comment.