mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Wow, for some reason, when reading bytecode from stdin, we were only reading
4 bytes at a time. Change this to read blocks of 4k git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f924b2de08
commit
5dfab9ec22
@ -624,7 +624,7 @@ Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) {
|
||||
size_t FileSize = 0;
|
||||
int BlockSize;
|
||||
uchar Buffer[4096], *FileData = 0;
|
||||
while ((BlockSize = read(0, Buffer, 4))) {
|
||||
while ((BlockSize = read(0, Buffer, 4096))) {
|
||||
if (BlockSize == -1) { free(FileData); return 0; }
|
||||
|
||||
FileData = (uchar*)realloc(FileData, FileSize+BlockSize);
|
||||
|
Loading…
Reference in New Issue
Block a user