Fix a logic error caught by the static analyzer.

llvm-svn: 137328
This commit is contained in:
Johnny Chen 2011-08-11 19:12:10 +00:00
parent 64503c8168
commit 8446277c11
1 changed files with 1 additions and 1 deletions

View File

@ -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;