From 907ac6f5510d7e30af4dd79450f4a8d06250c182 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 25 Aug 2012 08:25:54 +0200 Subject: [PATCH] Added a better check if a HASH is valid Signed-off-by: Sven Strickroth --- src/Git/GitHash.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Git/GitHash.h b/src/Git/GitHash.h index e2e7f5bd6..73033d11e 100644 --- a/src/Git/GitHash.h +++ b/src/Git/GitHash.h @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2008-2011 - TortoiseGit +// Copyright (C) 2008-2012 - TortoiseGit // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -44,7 +44,7 @@ public: } CGitHash(CString &str) { - if(str.GetLength()= '0' && possibleSHA1[i] <= '9') || (possibleSHA1[i] >= 'a' && possibleSHA1[i] <= 'f') || (possibleSHA1[i] >= 'A' && possibleSHA1[i] <= 'F'))) + return false; + } + return true; + } }; -- 2.11.4.GIT