Commit c75ec760 authored by h2zero's avatar h2zero Committed by Johny Mattsson
Browse files

Fix node.compile fwrite size check.

The return value from fwrite was being checked against the size of the data rather than the number of bytes written.
This caused node.compile() to falsely return failure.
parent e8caaebc
......@@ -603,7 +603,7 @@ static int writer(lua_State* L, const void* p, size_t size, void* u)
if (!file)
return 1;
if (size != 0 && (size != fwrite((const char *)p, size, 1, file)) )
if (size != 0 && (fwrite((const char *)p, size, 1, file) != 1) )
return 1;
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment