diff options
author | Marcus Comstedt | 2004-08-29 19:32:14 +0000 |
---|---|---|
committer | Marcus Comstedt | 2004-08-29 19:32:14 +0000 |
commit | 5a1e353c12db617c18760efe204f0a69631a29a1 (patch) | |
tree | 1410502091016ab05b46f57e54c615f776f88e08 /backends | |
parent | f6af7cdcc7530149bf976cb69a2aa7aab21abb84 (diff) | |
download | scummvm-rg350-5a1e353c12db617c18760efe204f0a69631a29a1.tar.gz scummvm-rg350-5a1e353c12db617c18760efe204f0a69631a29a1.tar.bz2 scummvm-rg350-5a1e353c12db617c18760efe204f0a69631a29a1.zip |
Oops, forgot to clear BSS...
svn-id: r14830
Diffstat (limited to 'backends')
-rw-r--r-- | backends/dc/dcloader.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/dc/dcloader.cpp b/backends/dc/dcloader.cpp index 17c13ceb74..04ad4ba003 100644 --- a/backends/dc/dcloader.cpp +++ b/backends/dc/dcloader.cpp @@ -226,6 +226,9 @@ bool DLObject::load(int fd) DBG("segment @ %p\n", segment); + if(phdr.p_memsz > phdr.p_filesz) + memset(((char *)segment) + phdr.p_filesz, 0, phdr.p_memsz - phdr.p_filesz); + if(lseek(fd, phdr.p_offset, SEEK_SET)<0 || read(fd, segment, phdr.p_filesz) != phdr.p_filesz) { seterror("Segment load failed."); |