[Lldb-commits] [lldb] r137328 - /lldb/trunk/source/Core/Scalar.cpp
Johnny Chen
johnny.chen at apple.com
Thu Aug 11 12:12:11 PDT 2011
Author: johnny
Date: Thu Aug 11 14:12:10 2011
New Revision: 137328
URL: http://llvm.org/viewvc/llvm-project?rev=137328&view=rev
Log:
Fix a logic error caught by the static analyzer.
Modified:
lldb/trunk/source/Core/Scalar.cpp
Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=137328&r1=137327&r2=137328&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Thu Aug 11 14:12:10 2011
@@ -1811,7 +1811,7 @@
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;
More information about the lldb-commits
mailing list