From f04cc368f78cab7f1fd81191c112a21a051da5cc Mon Sep 17 00:00:00 2001 From: Mayank Agarwal Date: Fri, 15 Mar 2013 10:57:08 -0700 Subject: [PATCH] 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 --- util/ldb_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/ldb_cmd.h b/util/ldb_cmd.h index 12b5c4a52..bb47b919d 100644 --- a/util/ldb_cmd.h +++ b/util/ldb_cmd.h @@ -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";