Quellcode durchsuchen

Fixed -0x80000000'00000000 constant issue

Brian Fiete vor 5 Jahren
Ursprung
Commit
355fd34c0b
3 geänderte Dateien mit 9 neuen und 10 gelöschten Zeilen
  1. 2 7
      IDE/src/ui/QuickFind.bf
  2. 6 2
      IDEHelper/COFF.cpp
  3. 1 1
      IDEHelper/Compiler/BfReducer.cpp

+ 2 - 7
IDE/src/ui/QuickFind.bf

@@ -296,6 +296,8 @@ namespace IDE.ui
         {
             if (mCurFindIdx == -1)
                 return;
+			if (!mFoundMatches)
+				return;
             String findText = scope String();
             mFindEditWidget.GetText(findText);
 			if (findText.Length == 0)
@@ -384,8 +386,6 @@ namespace IDE.ui
             String findTextUpper = scope String(findText);
             findTextUpper.ToUpper();
 
-			Debug.WriteLine("Before: mCurFindIdx:{} mCurFindStart:{} mCurFindCount:{}", mCurFindIdx, mCurFindStart, mCurFindCount);
-
             if ((mCurFindIdx == -1) && (mSelectionStart != null))
             {
                 mCurFindIdx = mSelectionStart.mIndex - 1;
@@ -460,11 +460,6 @@ namespace IDE.ui
 				mCurFindStart = mCurFindIdx;
 			}
 
-			defer
-			{
-				Debug.WriteLine("After: mCurFindIdx:{} mCurFindStart:{} mCurFindCount:{}", mCurFindIdx, mCurFindStart, mCurFindCount);
-			}
-
 			if (dir < 0)
 			{
 				int32 checkOfs = (mCurFindCount == 0) ? 1 : 0;

+ 6 - 2
IDEHelper/COFF.cpp

@@ -1030,7 +1030,10 @@ void COFF::CvParseMembers(DbgType* parentType, int tagIdx, bool ipi)
 
 									isConst = true;
 									if (cPtr[1] == '_')
-										constVal = -atoll(cPtr + 2);
+									{
+										cPtr[1] = '-';
+										constVal = atoll(cPtr + 1);
+									}
 									else
 										constVal = atoll(cPtr + 1);
 									*cPtr = 0;
@@ -2720,8 +2723,9 @@ void COFF::ParseCompileUnit_Symbols(DbgCompileUnit* compileUnit, uint8* sectionD
 						{
 							if (cPtr[1] == '_')
 							{
+								cPtr[1] = '-';
 								isConst = true;
-								constVal = -atoll(cPtr + 2);								
+								constVal = atoll(cPtr + 1);								
 								*cPtr = 0;
 							}
 							else if ((cPtr[1] >= '0') && (cPtr[1] <= '9'))

+ 1 - 1
IDEHelper/Compiler/BfReducer.cpp

@@ -6454,7 +6454,7 @@ BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, int depth)
 		}
 		else if (nextToken->GetToken() == BfToken_LParen)
 		{
-			Fail("Method name, 'this', or '~this' expected", node);
+			Fail("Method return type expected", node);
 
 			nameIdentifier = BfNodeDynCast<BfIdentifierNode>(origNode);
 			if (nameIdentifier != NULL)