-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug. Read binary content that contains \x00 will break in read_cs…
…tring(). (#12) * Fix Bug: If \x00 is the content of file, jfs.read() and FileIO.read() will not truncate it * add test case for the scenario that content has \x00 * add test content in test_read_content_with_zero() * shorten the CONTENT_WITH_ZERO constant * if the jfs_ function return size, use buf.raw[:size] instead of read_cstring() * add test_pread(), test case for pread. * revert read_cstring()
- Loading branch information
Showing
2 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters