Fixing a careless mistake in ldb

Summary: negation of the condition checked currently had to be checkd actually

Test Plan: make ldb; python ldb_test.py

Reviewers: sheki, dhruba

Reviewed By: sheki

Differential Revision: https://reviews.facebook.net/D9459
This commit is contained in:
Mayank Agarwal 2013-03-15 10:57:08 -07:00
parent a78fb5e8bc
commit f04cc368f7

View File

@ -99,7 +99,7 @@ public:
static string HexToString(const string& str) {
string parsed;
if (str[0] == '0' && str[1] == 'x') {
if (str[0] != '0' || str[1] != 'x') {
fprintf(stderr, "Invalid hex input %s. Must start with 0x\n",
str.c_str());
throw "Invalid hex input";