Fix a logic error caught by the static analyzer.
llvm-svn: 137328
This commit is contained in:
parent
64503c8168
commit
8446277c11
|
@ -1811,7 +1811,7 @@ Error
|
|||
Scalar::SetValueFromCString (const char *value_str, Encoding encoding, uint32_t byte_size)
|
||||
{
|
||||
Error error;
|
||||
if (value_str == NULL && value_str[0] == '\0')
|
||||
if (value_str == NULL || value_str[0] == '\0')
|
||||
{
|
||||
error.SetErrorString ("Invalid c-string value string.");
|
||||
return error;
|
||||
|
|
Loading…
Reference in New Issue