mirror of https://github.com/adamdruppe/arsd.git
omg
This commit is contained in:
parent
9eb1fdd13a
commit
b19526647e
|
@ -719,6 +719,8 @@ public:
|
||||||
import core.stdc.stdlib : malloc, free;
|
import core.stdc.stdlib : malloc, free;
|
||||||
auto tfn = (cast(char*)malloc(filename.length+1))[0..filename.length+1];
|
auto tfn = (cast(char*)malloc(filename.length+1))[0..filename.length+1];
|
||||||
if (tfn !is null) {
|
if (tfn !is null) {
|
||||||
|
tfn[0 .. filename.length] = filename[];
|
||||||
|
tfn[filename.length] = 0;
|
||||||
scope(exit) free(tfn.ptr);
|
scope(exit) free(tfn.ptr);
|
||||||
fl = fopen(tfn.ptr, "rb");
|
fl = fopen(tfn.ptr, "rb");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue