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.
This commit is contained in:
parent
e8caaebc5a
commit
c75ec760aa
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue