mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Compile Zeek with MSVC
Allow Zeek to be embedded in another project
This commit is contained in:
parent
2bd4af7477
commit
3a80b79497
53 changed files with 724 additions and 153 deletions
|
@ -117,9 +117,10 @@ bool LoadPolicyFileText(const char* policy_filename,
|
|||
// ### This code is not necessarily Unicode safe!
|
||||
// (probably fine with UTF-8)
|
||||
pf->filedata = new char[size + 1];
|
||||
if ( fread(pf->filedata, size, 1, f) != 1 )
|
||||
size_t n = fread(pf->filedata, 1, size, f);
|
||||
if ( ferror(f) )
|
||||
reporter->InternalError("Failed to fread() file data");
|
||||
pf->filedata[size] = 0;
|
||||
pf->filedata[n] = 0;
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue