Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert previous commit and fix it properly.
Turns out checking for the underflow and returning NULL there is not a good idea because NULL is used to indicate that no such object exists in the hash table, and we don't want to hijack that to mean error. This was ultimately what was causing a valid import to be unrecognized, which is why the tests were failing. Instead of checking for the underflow I'm now just checking if the sized string length is zero or if the strlen() of the c_string is zero and erroring out early. While here, add a test for this.
- Loading branch information
Showing
3 changed files
with
4 additions
and
13 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
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