- fix: Crash when directive line ends with '\' and at the last line.
This commit is contained in:
parent
f4f67d0b91
commit
1470f58206
1
NEWS.md
1
NEWS.md
|
@ -23,6 +23,7 @@ Red Panda C++ Version 2.18
|
|||
- enhancement: Add option in the debug settings, to limit the length of the ouput generated by gdb for arrays.
|
||||
- enhancement: Show shortcut info in toolbar's tooltip.
|
||||
- change: Use F11 as the shortcut for "Run". (It's the old shortcut for "Compile&Run")
|
||||
- fix: Crash when directive line ends with '\' and at the last line.
|
||||
|
||||
|
||||
Red Panda C++ Version 2.17
|
||||
|
|
|
@ -1071,9 +1071,9 @@ void CppPreprocessor::preprocessBuffer()
|
|||
|
||||
void CppPreprocessor::skipToEndOfPreprocessor()
|
||||
{
|
||||
int bufferCount = mBuffer.count();
|
||||
int indexLimit = mBuffer.count()-1;
|
||||
// Skip until last char of line is NOT \ anymore
|
||||
while ((mIndex < bufferCount) && mBuffer[mIndex].endsWith('\\'))
|
||||
while ((mIndex < indexLimit) && mBuffer[mIndex].endsWith('\\'))
|
||||
mIndex++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue