mirror of
https://github.com/Rayerd/dfl.git
synced 2025-04-25 20:49:58 +03:00
Fix Picture.fromFile for x86.
This commit is contained in:
parent
5fa5f9a50a
commit
19a27ed5a1
1 changed files with 4 additions and 2 deletions
|
@ -1533,8 +1533,10 @@ class Picture: Image // docmain
|
|||
/// ditto
|
||||
static Picture fromFile(File file)
|
||||
{
|
||||
auto size = file.size();
|
||||
ubyte[] buf = file.rawRead(new ubyte[size]);
|
||||
ulong size = file.size();
|
||||
if (size > size_t.max)
|
||||
throw new DflException("DFL: Picture.fromFile failure by large file given.");
|
||||
ubyte[] buf = file.rawRead(new ubyte[cast(size_t)size]);
|
||||
return fromMemory(buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue