diff -urN xwave-0.7-orig/src/edit.c xwave-0.7/src/edit.c --- xwave-0.7-orig/src/edit.c 2006-05-21 15:04:19 +0900 +++ xwave-0.7/src/edit.c 2009-12-28 16:56:36 +0900 @@ -1127,7 +1127,7 @@ wd->name); /* after cut the samples fitting in memory ? */ - if ((wd->inmem)||(lengthmaxmem)) { + if ((wd->inmem)||(length<=md->maxmem)) { char* newbuf; if ((newbuf=(char*) malloc(length))==NULL) { watch_cursor(False); diff -urN xwave-0.7-orig/src/fileop.c xwave-0.7/src/fileop.c --- xwave-0.7-orig/src/fileop.c 1996-11-08 02:26:01 +0900 +++ xwave-0.7/src/fileop.c 2009-12-28 16:56:26 +0900 @@ -107,7 +107,7 @@ watch_cursor(True); - if (af.lengthmaxmem) { + if (af.length<=MD->maxmem) { if ((wd->buffer = (byte *) malloc(af.length)) == NULL) { watch_cursor(False); warn_popup(MD->mw->form,MD->mw->messages); @@ -207,7 +207,7 @@ wd->markbeg=0; wd->marklength=0; - if (wd->lengthmaxmem) { + if (wd->length<=MD->maxmem) { if ((wd->buffer = (byte *) malloc(wd->length)) == NULL) { XtFree((char*) wd); af_close(af);