diff options
Diffstat (limited to 'emu/Android')
| -rw-r--r-- | emu/Android/alloc-andr.c | 5 | ||||
| -rw-r--r-- | emu/Android/amain.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/emu/Android/alloc-andr.c b/emu/Android/alloc-andr.c index 196062e..8325951 100644 --- a/emu/Android/alloc-andr.c +++ b/emu/Android/alloc-andr.c @@ -805,7 +805,7 @@ free(void *v) { Bhdr *b; - if(v != nil) { + if(v != nil && v > 0x1000 && v < 0xffff0000) { if(Npadlong) v = (ulong*)v-Npadlong; D2B(b, v); @@ -820,6 +820,9 @@ realloc(void *v, size_t size) { void *nv; + if(v <= 0x1000 || v >= 0xffff0000) + v = nil; + if(size == 0) return malloc(size); /* temporary change until realloc calls can be checked */ if(v != nil) diff --git a/emu/Android/amain.c b/emu/Android/amain.c index 46f5ebf..26ca8c5 100644 --- a/emu/Android/amain.c +++ b/emu/Android/amain.c @@ -31,7 +31,7 @@ extern int mflag; extern int Xsize; // = 640; // = 640; extern int Ysize; // = 480; // = 480; int bflag = 1; - int sflag = 0; + int sflag = 1; int qflag = 0; int xtblbit = 0; ulong displaychan = 32; @@ -295,6 +295,7 @@ amain() snprint(sdcard_path, 127, "%s/Inferno", getenv("EXTERNAL_STORAGE")); strecpy(rootdir, rootdir+sizeof(rootdir), sdcard_path); +//LOGI("%s: %d sdcard_path=%s", __func__, __LINE__, sdcard_path); snprint(calltracelog_path, 127, "%s/backtrace.log", rootdir); f = fopen(calltracelog_path, "a"); if(f){ |
