aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index cc28ce6f..56583c76 100644
--- a/src/library.js
+++ b/src/library.js
@@ -3302,8 +3302,9 @@ LibraryManager.library = {
}
var info = FS.streams[stream];
if (!info) return -1;
- return allocate(info.object.contents.slice(offset, offset+num),
- 'i8', ALLOC_NORMAL);
+ var contents = info.object.contents;
+ contents = Array.prototype.slice.call(contents, offset, offset+num);
+ return allocate(contents, 'i8', ALLOC_NORMAL);
},
__01mmap64_: 'mmap',