X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FRuntime.java;fp=src%2Forg%2Fibex%2Fnestedvm%2FRuntime.java;h=5c2cc6a271b57db0ff77284b4d1bff66f07e6227;hp=4618dc38de00aff6f4efbcb2c79159b9602abb47;hb=d309b21d2ee150a9f426c7d22a5ce6d392b59d26;hpb=3e206c53f6ee3d09c3bb781526c0fe01bf8f6c75 diff --git a/src/org/ibex/nestedvm/Runtime.java b/src/org/ibex/nestedvm/Runtime.java index 4618dc3..5c2cc6a 100644 --- a/src/org/ibex/nestedvm/Runtime.java +++ b/src/org/ibex/nestedvm/Runtime.java @@ -1252,6 +1252,7 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable { /** Helper function to read a cstring from main memory */ public final String cstring(int addr) throws ReadFaultException { + if (addr == 0) return null; StringBuffer sb = new StringBuffer(); for(;;) { int word = memRead(addr&~3);