Malloc: Save the caller's file name in the correct entry.

This commit is contained in:
Greg Lehey 2000-02-29 06:13:24 +00:00
parent 6992cfe973
commit e08bedf9bf
1 changed files with 2 additions and 2 deletions

View File

@ -168,8 +168,8 @@ MMalloc(int size, char *file, int line)
malloced[i].size = size;
malloced[i].line = line;
malloced[i].address = result;
bcopy(f, malloced[lastfree].file, min(strlen(f), MCFILENAMELEN - 1));
malloced[lastfree].file[MCFILENAMELEN - 1] = '\0';
bcopy(f, malloced[i].file, min(strlen(f), MCFILENAMELEN - 1));
malloced[i].file[MCFILENAMELEN - 1] = '\0';
}
if (malloccount > highwater)
highwater = malloccount;