Skip to content

Commit

Permalink
fix wesnoth.read_file()
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Feb 18, 2016
1 parent 439ded5 commit 8eafd50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripting/lua_fileops.cpp
Expand Up @@ -141,7 +141,7 @@ int intf_read_file(lua_State *L)
//throws an exception if malloc failed.
char* out = luaL_prepbuffsize(&b, size);
fs->read(out, size);
if(!fs->good()) {
if(fs->good()) {
luaL_addsize(&b, size);
}
luaL_pushresult(&b);
Expand Down

0 comments on commit 8eafd50

Please sign in to comment.