projects
/
nestedvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e206c5
)
have cstring() return null if passed a null pointer
author
David Crawshaw
<david@zentus.com>
Sat, 18 Nov 2006 02:09:59 +0000
(18:09 -0800)
committer
David Crawshaw
<david@zentus.com>
Sat, 18 Nov 2006 02:09:59 +0000
(18:09 -0800)
darcs-hash:
20061118020959
-0c629-
68cc6e9336b7c981bc3ddd49ffc43978f39163c6
.gz
src/org/ibex/nestedvm/Runtime.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/nestedvm/Runtime.java
b/src/org/ibex/nestedvm/Runtime.java
index
4618dc3
..
5c2cc6a
100644
(file)
--- 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);