forked from rebolsource/r3
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check parameter to avoid uninitialized var
reported by coverity
- Loading branch information
Showing
1 changed file
with
3 additions
and
0 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
else
branch along with thereturn NULL
is (most likely unintended) change of behaviour forDecode_UTF_String
.A call to
What_UTF
can legitimately return0
to indicate that no BOM is present. So without this change, whenutf == -1
is passed intoDecode_UTF_String
, the function decodes according to the BOM if present, or falls back to UTF-8 otherwise. With this change, whenutf == -1
the function no longer decodes strings without a BOM.