Skip to content

Commit 1ab3429

Browse files
committed
Fixed issue 261. Lua file write was using strlen for length rather than lua string length
1 parent cfcbecd commit 1ab3429

File tree

1 file changed

+1
-1
lines changed
  • source/application/lua_libraries

1 file changed

+1
-1
lines changed

source/application/lua_libraries/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int lua_file_write(lua_State *L)
276276
lfs_ssize_t result = lfs_file_write(&filesystem,
277277
&stream->file,
278278
string,
279-
strlen(string));
279+
expected_length);
280280

281281
if (result != expected_length)
282282
{

0 commit comments

Comments
 (0)