fixed bug in database upgrade procedure (move flags)
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 27 Sep 2017 20:29:04 +0000 (23:29 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 27 Sep 2017 20:29:04 +0000 (23:29 +0300)
src/server/tools/nxdbmgr/upgrade.cpp

index cbe16ab..1044064 100644 (file)
@@ -663,7 +663,7 @@ static BOOL H_UpgradeFromV503(int currVersion, int newVersion)
  */
 inline void MoveFlag(UINT32 oldVar, UINT32 *newVar, UINT32 oldFlag, UINT32 newFlag)
 {
-   *newVar |= (oldVar & oldFlag > 0) ? newFlag : 0;
+   *newVar |= ((oldVar & oldFlag) != 0) ? newFlag : 0;
 }
 
 /**