浏览代码

Merge pull request #18 from bjornbytes/fix-operator-precedence

Fix operator precedence;
Miku AuahDark 2 年之前
父节点
当前提交
fd569fab4f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/windows/SChannelConnection.cpp

+ 2 - 2
src/windows/SChannelConnection.cpp

@@ -248,12 +248,12 @@ bool SChannelConnection::connect(const std::string &hostname, uint16_t port)
 	{
 		SecPkgContext_Flags resultFlags;
 		QueryContextAttributes(context.get(), SECPKG_ATTR_FLAGS, &resultFlags);
-		if (resultFlags.Flags & ISC_REQ_CONFIDENTIALITY == 0)
+		if ((resultFlags.Flags & ISC_REQ_CONFIDENTIALITY) == 0)
 		{
 			debug << "Resulting context is not encrypted, marking as failed\n";
 			success = false;
 		}
-		if (resultFlags.Flags & ISC_REQ_INTEGRITY == 0)
+		if ((resultFlags.Flags & ISC_REQ_INTEGRITY) == 0)
 		{
 			debug << "Resulting context is not signed, marking as failed\n";
 			success = false;